kasadeghUntitled Query
    Updated 2022-10-16
    with sol_defi_tx_stats as (
    select
    block_timestamp::date as day,
    count(distinct tx_id) as tx_count
    from solana.fact_events
    where
    program_id in (select ADDRESS from solana.core.dim_labels where LABEL ='zeta')
    and day >= '2022-10-01' and day<'2022-10-16'
    group by 1
    order by 1
    )
    select day,
    case
    when day = '2022-10-11' then 'The hack'
    when day < '2022-10-11' then 'Before the hack'
    when day > '2022-10-11' then 'After the hack'
    end period,
    tx_count,
    avg(tx_count) over (order by day ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) as "3Day_MA_tx_count"

    from sol_defi_tx_stats
    Run a query to Download Data