kasadeghUntitled Query
    Updated 2022-10-17
    select date,
    case
    when date > '2022-10-11' then 'After Hack'
    when date = '2022-10-11' then 'The Hack'
    else 'Before Hack' end as period,
    avg_number_of_stake,
    avg_number_of_stakers,
    avg_amount_of_stake
    FROM
    (
    select date(block_timestamp) as date,
    count(DISTINCT(STAKE_AUTHORITY)) as avg_number_of_stakers,
    count(DISTINCT(tx_id)) as avg_number_of_stake ,
    sum(POST_TX_STAKED_BALANCE/pow(10,9)) as avg_amount_of_stake
    from solana.core.ez_staking_lp_actions
    where event_type = 'delegate' and
    block_timestamp::date >= '2022-10-1' and block_timestamp::date < '2022-10-16'
    group by 1
    )
    order by 1
    Run a query to Download Data