nsa2000cefi and defi transactions and users
    Updated 2022-10-17
    select
    block_timestamp::date as date,
    'Defi Pre Hack' as period,
    count(distinct tx_id) as tx_cnt,
    count(distinct instruction:accounts[0]) as uniq_users
    from solana.core.fact_events inner join solana.core.dim_labels
    on program_id = address
    where SUCCEEDED='TRUE'
    and label_type in('defi')
    and block_timestamp::date >='2022-10-01'
    and block_timestamp::date < '2022-10-11'
    group by 1 , 2

    UNION
    select
    block_timestamp::date as date,
    'Defi Post Hack' as period,
    count(distinct tx_id) as tx_cnt,
    count(distinct instruction:accounts[0]) as uniq_users
    from solana.core.fact_events inner join solana.core.dim_labels
    on program_id = address
    where SUCCEEDED='TRUE'
    and label_type in('defi')
    and block_timestamp::date >='2022-10-11'
    and block_timestamp::date <= CURRENT_DATE - 1
    group by 1 , 2

    UNION
    select
    block_timestamp::date as date,
    'Cefi Pre Hack' as period,
    count(distinct tx_id) as tx_cnt,
    count(distinct TX_FROM) as uniq_users
    from solana.core.fact_transfers t,solana.core.dim_labels l
    Run a query to Download Data