nitsAPE Number of Transfers
    Updated 2022-12-07
    with price as
    (SELECT date(hour) as day, avg(price) as avg_price
    from ethereum.core.fact_hourly_token_prices
    where token_address = '0x4d224452801aced8b2f0aebe155379bb5d594381'
    GROUP by 1)

    SELECT day, COUNT(DISTINCT tx_hash) as total_txs,
    sum(amount*avg_price) as usd_vol,
    sum(amount) as total_amt,
    sum(total_amt) over (order by day) as cum_amt,
    count(DISTINCT from_address) as senders,
    count(DISTINCT to_address) as receivers,
    sum(usd_vol) over (order by day) as cum_vol,
    sum(total_txs) over (order by day) as cum_txs,
    avg(avg_price) as net_price
    from
    ( SELECT * from
    (SELECT * from ethereum.core.ez_token_transfers
    where contract_address = '0x4d224452801aced8b2f0aebe155379bb5d594381')
    join price on date(block_timestamp) = day)
    where day >= CURRENT_DATE - {{n}}
    GROUP by 1
    -- LIMIT 19
    Run a query to Download Data