cypherAPE staking stats over time
    Updated 2022-12-08
    select
    date_trunc('hour',BLOCK_TIMESTAMP) as date,
    case
    when origin_function_signature = '0x46583a05' then 'BAYC Pool'
    when origin_function_signature = '0x8ecbffa7' then 'MAYC Pool'
    when origin_function_signature = '0xd346cbd9' then 'BAKC Pool'
    when origin_function_signature = '0x9dcaafb4' then '$APE Only Pool'
    else null end as pool,
    count(distinct tx_hash) as n_tx,
    count(distinct origin_from_address) as unique_users,
    sum(event_inputs:value/pow(10,18)) as volume,
    sum(n_tx) over (partition by pool order by date) as cum_n_tx,
    sum(unique_users) over (partition by pool order by date) as cum_unique_users,
    sum(volume) over (partition by pool order by date) as cum_volume
    from ethereum.core.fact_event_logs
    where pool is not null
    and origin_to_address = '0x5954ab967bc958940b7eb73ee84797dc8a2afbb9'
    and tx_status = 'SUCCESS'
    and event_name = 'Transfer'
    group by 1,2
    order by 1
    Run a query to Download Data