nsa2000Transfers from CEX
    Updated 2022-10-17
    WITH
    t1 as (
    SELECT
    trunc (block_timestamp,'day') as date,
    case when block_timestamp < '2022-10-11' then 'Before hack'
    when block_timestamp between '2022-10-11' and '2022-10-12' then 'Hack day'
    else 'After hack' 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 '1 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-10-11' then 'Before hack'
    when block_timestamp between '2022-10-11' and '2022-10-12' then 'Hack day'
    else 'After hack' 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 '1 MONTH' and label_type LIKE 'cex'
    GROUP BY 1,2,3
    )
    select * from t1
    Run a query to Download Data