cypherAPE airdrop stats over time
    Updated 2022-12-07
    --credit to alik110
    with apeprice as (
    select hour::date as day,
    avg (price) as APE_Price
    from ethereum.core.fact_hourly_token_prices
    where token_address = '0x4d224452801aced8b2f0aebe155379bb5d594381'
    group by 1)

    select block_timestamp::date as date,
    APE_Price,
    count (distinct tx_hash) as TX_Count,
    count (distinct origin_from_address) as Users_Count,
    sum (event_inputs:value/1e18) as Claimed_Ape_Volume,
    avg (event_inputs:value/1e18) as Average_APE_Volume,
    median (event_inputs:value/1e18) as Median_APE_Volume,
    min (event_inputs:value/1e18) as Minimum_APE_Volume,
    max (event_inputs:value/1e18) as Maximum_APE_Volume,
    sum (TX_Count) over (order by date) as Cumulative_Claims_Count,
    sum (Claimed_Ape_Volume) over (order by date) as Cumulative_Received_Volume
    from ethereum.core.fact_event_logs t1 join apeprice t2 on t1.block_timestamp::date = t2.day
    where origin_to_address = '0x025c6da5bd0e6a5dd1350fda9e3b6a614b205a1f'
    and event_name = 'Transfer'
    and origin_function_signature = '0x48c54b9d'
    and tx_status = 'SUCCESS'
    group by 1,2
    order by 1
    Run a query to Download Data