0-MIDstake active
    Updated 2023-04-13
    select BLOCK_TIMESTAMP::date as date
    ,case
    when ACTION like '%deposit%' then 'stake'
    when ACTION like '%withdraw%' then 'Unstake' end as dis_action
    ,case
    when date>='2022-11-07'then 'After Ftx Chaos'else 'Before Ftx Chaos' end as Chaos_time
    , count(distinct TX_ID)as action_count
    ,count(distinct ADDRESS)as user_count
    ,sum(AMOUNT/1e9)as action_volume
    from solana.core.fact_stake_pool_actions
    where date>='2022-10-25'
    and SUCCEEDED='TRUE'
    and dis_action is not null
    group by 1,2,3
    Run a query to Download Data