denze-e7j2NUDeck_04 Holder Distribution over time
Updated 2023-05-07
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- forked from Deck_03 @ https://flipsidecrypto.xyz/edit/queries/d0c24ebd-3e0d-4880-88bc-cd02d79e7f7c
-- forked from Deck_02 @ https://flipsidecrypto.xyz/edit/queries/f796059d-d65b-4dab-9bb4-06592d039365
-- forked from Holders by {{nft_contract_address}} - Multiple Contracts @ https://flipsidecrypto.xyz/edit/queries/a55ce213-0335-4cd9-bd3f-d5a7d45fea9e
-- forked from 4a31c144-891d-422d-9e02-84aa2a80baae
WITH
input_contracts AS (
SELECT
trim(F.value) AS nft_contract_address
FROM (
SELECT
SPLIT(data.nft_contract_address, ';') AS input
FROM VALUES
-- (lower('{{nft_contract_address}}'))
(lower('0x6efc003d3f3658383f06185503340c2cf27a57b6; 0x769272677fab02575e84945f03eca517acc544cc; 0x39ee2c7b3cb80254225884ca001f57118c8f21b6')) -- Memeland
-- (lower('0x39ee2c7b3cb80254225884ca001f57118c8f21b6')) -- Memeland
-- (lower('0x6efc003d3f3658383f06185503340c2cf27a57b6; 0x769272677fab02575e84945f03eca517acc544cc; 0x39ee2c7b3cb80254225884ca001f57118c8f21b6')) -- Memeland
-- (lower('0xed5af388653567af2f388e6224dc7c4b3241c544 ; 0x306b1ea3ecdf94ab739f1910bbda052ed4a9f949')) -- Azuki
AS data(nft_contract_address)
) i
, Table(Flatten(i.input)) AS F
WHERE trim(F.value) regexp '^0x[0-9a-fA-F]{40}$' -- check address is a valid format, i.e. starts with 0x and has 42 characters total
)
, input_time AS (
SELECT
CASE
WHEN to_timestamp_ntz(data.snapshot_time) > date_trunc('minute', current_timestamp) THEN date_trunc('minute', current_timestamp)
ELSE date_trunc('minute', to_timestamp_ntz(data.snapshot_time))
END AS snapshot_time
FROM VALUES
Run a query to Download Data