Moefee tot
    Updated 2024-05-08

    (select
    'blast ' as chain,
    avg_fee_usd
    from (with
    p as (select hour,
    avg (price) as price
    from ethereum.price.ez_hourly_token_prices
    where symbol ilike 'wETH'
    group by 1)
    select
    avg (tx_fee*price) as avg_fee_usd
    from blast.core.fact_transactions join p on date_trunc('hour', block_timestamp) = hour
    where block_timestamp >= CURRENT_DATE - 6)
    )



    union all

    (select
    'Polygon ' as chain,
    avg_fee_usd
    from(with
    p as (select hour as hour,
    avg (price) as price
    from ethereum.price.ez_hourly_token_prices
    where symbol = 'MATIC'
    group by 1)
    select