badboyUntitled Query
    Updated 2022-12-07

    with maintable
    as (
    select date_trunc (hour,block_timestamp)
    as date,

    case when origin_function_signature = '0x9dcaafb4' then '$APE Only Pool'
    when origin_function_signature = '0x8ecbffa7' then 'MAYC Pool'

    when origin_function_signature = '0x46583a05' then 'BAYC Pool'
    when origin_function_signature = '0xd346cbd9' then 'BAKC Pool'

    else null end as pool_type,
    count (distinct tx_hash) as TX_Count,

    count (distinct origin_from_address) as Users_Count,
    sum (event_inputs:value/1e18) as Volume

    from ethereum.core.fact_event_logs
    where origin_to_address = '0x5954ab967bc958940b7eb73ee84797dc8a2afbb9'

    and event_name = 'Transfer'
    and tx_status = 'SUCCESS'

    and pool_type is not null
    group by 1,2)


    select pool_type,
    avg (tx_count) as Average_TX_Count,

    avg (users_count)
    as Average_Users_Count,
    avg (volume)
    as Average_APE_Volume
    Run a query to Download Data