freemartianUntitled Query
    Updated 2022-07-30

    select sum(abs(amount)) as collected_fee, avg(price) as p, collected_fee*p as fee_usd,
    date_trunc('day', block_timestamp::date) as TIME,
    count(distincttx_id) as sale_count, fee_usd/sale_count as average_daily_fee
    from polygon.udm_events u
    inner join ethereum.core.fact_hourly_token_prices pr on to_char(block_timestamp, 'yyyy-mm-dd HH24:00:00.000') = hour
    where pr.symbol = 'WETH'
    and event_name = 'transfer'
    and event_type = 'erc20_transfer'
    and to_address in ('0x5b3256965e7c3cf26e11fcaf296dfc8807c01073', '0x8de9c5a032463c561423387a9648c5c7bcc5bc90')
    and u.symbol = 'WETH'
    group by TIME


    Run a query to Download Data