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