potmoMatic Fees USD
    Updated 2022-07-09
    with matic_fee as (
    select date_trunc('hour', block_timestamp) as date_time,
    avg(tx_fee) as fee
    from polygon.core.fact_transactions
    where block_timestamp::date >= '2022-07-01'
    group by 1
    order by 1
    ),
    matic_usd as (
    select hour, price
    from ethereum.core.fact_hourly_token_prices
    where hour::date >= '2022-07-01'
    and symbol ilike 'matic'
    )
    select f.date_time,
    f.fee ,
    u.price as price_usd,
    fee * price_usd as fee_usd
    from
    matic_fee f
    left join
    matic_usd u
    on f.date_time = u.hour
    order by 1
    Run a query to Download Data