Moefee
    Updated 2024-05-08


    (select
    'blast ' as chain ,hour,
    total_fee_usd,
    fee_per_tx
    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
    date_trunc('hour', block_timestamp) as hour ,
    count(distinct tx_hash) as tx_count,
    sum (tx_fee*price) as total_fee_usd,
    total_fee_usd/tx_count as fee_per_tx
    from blast.core.fact_transactions join p
    on date_trunc('hour', block_timestamp) = hour
    where block_timestamp >= CURRENT_DATE - 6
    group by 1)
    )



    union all

    (select
    'Polygon ' as chain ,hour,
    total_fee_usd,
    fee_per_tx
    from(with
    p as (select hour as hour,
    QueryRunArchived: QueryRun has been archived