BlockTracker txns -- avg(tx_fee) copy
    Updated 2025-04-06
    -- forked from txns -- avg(tx_fee) @ https://flipsidecrypto.xyz/studio/queries/ace9fd05-bd89-4284-bd67-b2df5ec95fa0

    select
    date_trunc('{{granularity}}', BLOCK_TIMESTAMP) as date,
    'Swell' as blockchain,
    count(BLOCK_NUMBER) as n_blocks,
    count(DISTINCT tx_hash) as n_transaction,
    count(DISTINCT case when TX_SUCCEEDED = 'TRUE' then tx_hash end) as TRANSACTION_COUNT_SUCCESS_,
    count(DISTINCT case when TX_SUCCEEDED = 'FALSE' then tx_hash end) as TRANSACTION_COUNT_FAILED_,
    TRANSACTION_COUNT_SUCCESS_ / (TRANSACTION_COUNT_SUCCESS_ + TRANSACTION_COUNT_FAILED_) as success_rate,
    count(DISTINCT from_address) as n_active_users,
    sum(tx_fee * b.price) as total_fee_usd,
    sum(tx_fee * b.price) / count(DISTINCT tx_hash) as average_fee_usd
    from swell.core.fact_transactions a
    left join (
    select
    date_trunc('day', hour) as date,
    median(price) as price
    from crosschain.price.ez_prices_hourly
    where blockchain = 'ethereum'
    and is_native = 'TRUE'
    group by 1
    order by date desc
    ) b ON date_trunc('day', block_timestamp) = b.date
    group by 1 , 2
    order by date desc

    -- #7132F5


    Last run: 21 days ago
    DATE
    BLOCKCHAIN
    N_BLOCKS
    N_TRANSACTION
    TRANSACTION_COUNT_SUCCESS_
    TRANSACTION_COUNT_FAILED_
    SUCCESS_RATE
    N_ACTIVE_USERS
    TOTAL_FEE_USD
    AVERAGE_FEE_USD
    1
    2025-04-06 00:00:00.000Swell278082780827775330.9988134117.0364858550.0002530381852
    2
    2025-04-05 00:00:00.000Swell466464664646626200.9995716565.5544815890.0001190773397
    3
    2025-04-04 00:00:00.000Swell470044700446953510.9989153579.6169704850.0002045989806
    4
    2025-04-03 00:00:00.000Swell488314883148760710.99854667318.5052749380.0003789657172
    5
    2025-04-02 00:00:00.000Swell4898148981488561250.99744870719.6107767480.0004003751812
    6
    2025-04-01 00:00:00.000Swell486484864848563850.99825381613.4879519090.0002772560415
    7
    2025-03-31 00:00:00.000Swell483894838948321680.99859567411.6801047670.0002413793376
    8
    2025-03-30 00:00:00.000Swell473374733747293440.999074788.300544380.0001753500302
    9
    2025-03-29 00:00:00.000Swell470664706646975910.99806731912.5746283190.0002671701083
    10
    2025-03-28 00:00:00.000Swell4763147631474511800.9962212984.9310752780.0001035265957
    11
    2025-03-27 00:00:00.000Swell4736147361471572040.99569339017.5474494430.0003705042006
    12
    2025-03-26 00:00:00.000Swell4897248972485474250.99132248040.1822268860.000820514312
    13
    2025-03-25 00:00:00.000Swell4737147371472261450.99693929412.059563290.0002545769203
    14
    2025-03-24 00:00:00.000Swell4767847678475691090.9977143326.5735883310.0001378746661
    15
    2025-03-23 00:00:00.000Swell4622746227461121150.9975122495.2469824470.0001135047147
    16
    2025-03-22 00:00:00.000Swell462984629846201970.9979052172.7284100280.00005893148794
    17
    2025-03-21 00:00:00.000Swell4660646606464981080.9976832375.4435287910.0001167988841
    18
    2025-03-20 00:00:00.000Swell4715247152470011510.99679827514.167143620.0003004568973
    19
    2025-03-19 00:00:00.000Swell4744347443472981450.99694427511.7406082620.0002474676614
    20
    2025-03-18 00:00:00.000Swell4685946859467291300.9972262614.8490964390.0001034827128
    ...
    131
    12KB
    3s