aureasarsanedesaptos gas 3.2
    Updated 4 days ago
    WITH daily_fees AS (
    -- Aptos daily fees with price
    SELECT
    'aptos' as blockchain,
    DATE_TRUNC('day', t.block_timestamp) as date,
    AVG(t.gas_used * t.gas_unit_price * p.price)/pow(10,8) as avg_tx_fee_usd
    FROM aptos.core.fact_transactions t
    LEFT JOIN aptos.price.ez_prices_hourly p
    ON DATE_TRUNC('hour', t.block_timestamp) = p.hour
    AND p.symbol = 'APT'
    WHERE t.block_timestamp >= CURRENT_DATE - INTERVAL '{{days}} days'
    AND t.success = TRUE
    GROUP BY 1, 2

    UNION ALL
    -- Ethereum daily fees with price
    SELECT
    'ethereum' as blockchain,
    DATE_TRUNC('day', t.block_timestamp) as date,
    AVG(t.tx_fee * p.price) as avg_tx_fee_usd
    FROM ethereum.core.fact_transactions t
    LEFT JOIN ethereum.price.ez_prices_hourly p
    ON DATE_TRUNC('hour', t.block_timestamp) = p.hour
    AND p.symbol = 'ETH'
    WHERE t.block_timestamp >= CURRENT_DATE - INTERVAL '{{days}} days'
    AND t.status = 'SUCCESS'
    GROUP BY 1, 2

    UNION ALL
    -- Near daily fees with price
    SELECT
    'near' as blockchain,
    DATE_TRUNC('day', t.block_timestamp) as date,
    AVG((t.transaction_fee / POW(10, 24)) * p.price) as avg_tx_fee_usd
    Last run: 4 days ago
    BLOCKCHAIN
    DATE
    AVG_TX_FEE_USD
    DAILY_FEE_RANK
    1
    ethereum2025-04-14 00:00:00.0000.22903250071
    2
    solana2025-04-14 00:00:00.0000.0087291734722
    3
    near2025-04-14 00:00:00.0000.0011856654323
    4
    aptos2025-04-14 00:00:00.0000.00062656615214
    5
    ethereum2025-04-13 00:00:00.0000.28916072941
    6
    solana2025-04-13 00:00:00.0000.0095144470682
    7
    near2025-04-13 00:00:00.0000.0013289029283
    8
    aptos2025-04-13 00:00:00.0000.00073497890794
    9
    ethereum2025-04-12 00:00:00.0000.23898272151
    10
    solana2025-04-12 00:00:00.0000.010251618012
    11
    near2025-04-12 00:00:00.0000.0013159046023
    12
    aptos2025-04-12 00:00:00.0000.00078281287034
    13
    ethereum2025-04-11 00:00:00.0000.24809194291
    14
    solana2025-04-11 00:00:00.0000.0086497512522
    15
    near2025-04-11 00:00:00.0000.0012709201613
    16
    aptos2025-04-11 00:00:00.0000.00094092034334
    17
    ethereum2025-04-10 00:00:00.0000.44354541371
    18
    solana2025-04-10 00:00:00.0000.0095916277732
    19
    near2025-04-10 00:00:00.0000.0012691240273
    20
    aptos2025-04-10 00:00:00.0000.0010235912614
    ...
    124
    6KB
    136s