nsa2000opso7
    Updated 2022-12-09
    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