nsa2000opso7
Updated 2022-12-09Copy 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
›
⌄
WITH
t1 as (
SELECT
trunc (block_timestamp,'day') as date,
case when block_timestamp < '2022-11-08' then 'Before Collapse'
when block_timestamp between '2022-11-08' and '2022-11-09' then 'Collapse day'
else 'After Collapse' end as period,
label,
count(distinct tx_id) as transfers
from solana.core.fact_transfers ft
join solana.dim_labels dl on ft.tx_from=dl.address
WHERE block_timestamp >= CURRENT_DATE-INTERVAL '2 MONTH' and label_type LIKE 'cex'
GROUP BY 1,2,3
),
t2 as (
SELECT
trunc (block_timestamp,'day') as date,
case when block_timestamp < '2022-11-08' then 'Before Collapse'
when block_timestamp between '2022-11-08' and '2022-10-09' then 'Collapse day'
else 'After Collapse' end as period,
label,
count(distinct tx_id) as transfers
from solana.core.fact_transfers ft
join solana.dim_labels dl on ft.tx_to=dl.address
WHERE block_timestamp >= CURRENT_DATE-INTERVAL '2 MONTH' and label_type LIKE 'cex'
GROUP BY 1,2,3
)
select * from t1
Run a query to Download Data