amir007NFT crosschain showdown: y00ts vs Art Gobblers - Daily Number of New Address With >= 375 $DUST
Updated 2022-11-27Copy Reference Fork
99
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
›
⌄
WITH token_holdings AS (
SELECT block_timestamp, post_tokens.value:owner AS wallet, post_tokens.value:mint AS token, post_tokens.value:uiTokenAmount:uiAmount AS amount,
ROW_NUMBER() OVER (PARTITION BY wallet, token ORDER BY block_timestamp DESC) AS rn
FROM solana.core.fact_transactions, LATERAL FLATTEN(input => post_token_balances) post_tokens
WHERE SUCCEEDED = 'True'
AND post_tokens.value:owner = wallet
AND post_tokens.value:mint = 'DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ'
AND block_timestamp >= '2022-02-01'
ORDER BY wallet, token, rn
), eligible_wallets AS (
SELECT wallet
FROM token_holdings
WHERE rn = 1
AND amount >= 375
AND amount IS NOT NULL
AND amount <> ''
), min_day AS (
SELECT wallet, MIN(date_trunc('day',block_timestamp)) AS day
FROM token_holdings
WHERE amount >= 375
AND amount IS NOT NULL
AND amount <> ''
AND wallet IN (SELECT wallet FROM eligible_wallets)
GROUP BY wallet
)
SELECT day,
case
when day >= '2022-08-07' and day <= '2022-08-29' then 'y00tlist Scholarship Open for Application'
when day >= '2022-08-29' and day <= '2022-09-03' then 'y00tlist Application Status Announcement'
when day = '2022-09-04' then 'Pre-t00bs Mint Day'
when day >= '2022-09-05' and day <= '2022-09-06' then 't00bs Mint Day'
when day >= '2022-09-06' and day <= '2022-09-08' then 'Post-t00bs Mint Day'
--when day = '2022-09-09' then 'y00ts Reveal Day'
when day > '2022-09-09' then 'Post y00ts Reveal'
else 'Prior to y00ts'
end as periods,
Run a query to Download Data