0-MIDdaily tx fee
    Updated 2024-08-15
    with tab1 as (
    select
    TX_HASH
    from near.core.ez_token_transfers
    where TRANSFER_TYPE='nep141'
    ),
    tab2 as (
    select BLOCK_TIMESTAMP::date as day
    ,TX_HASH
    ,TRANSACTION_FEE/1e24 as tx_fee
    from near.core.fact_transactions
    where BLOCK_TIMESTAMP::date>=current_date-30
    )
    select day
    ,avg(tx_fee) as fee
    from tab1
    left join tab2
    on tab1.TX_HASH=tab2.TX_HASH
    where day is not null
    group by 1


    QueryRunArchived: QueryRun has been archived