aureasarsanedesaptos gas 3.2
    Updated 1 day 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: 1 day ago
    BLOCKCHAIN
    DATE
    AVG_TX_FEE_USD
    DAILY_FEE_RANK
    1
    ethereum2025-04-28 00:00:00.0000.18780685081
    2
    solana2025-04-28 00:00:00.0000.0090919251262
    3
    near2025-04-28 00:00:00.0000.0014154493493
    4
    aptos2025-04-28 00:00:00.0000.00054337019564
    5
    ethereum2025-04-27 00:00:00.0000.17569967271
    6
    solana2025-04-27 00:00:00.0000.011072806762
    7
    near2025-04-27 00:00:00.0000.0016905135723
    8
    aptos2025-04-27 00:00:00.0000.00051375956764
    9
    ethereum2025-04-26 00:00:00.0000.17942232621
    10
    solana2025-04-26 00:00:00.0000.010573567672
    11
    near2025-04-26 00:00:00.0000.0017603573683
    12
    aptos2025-04-26 00:00:00.0000.00058535543174
    13
    ethereum2025-04-25 00:00:00.0000.2581817671
    14
    solana2025-04-25 00:00:00.0000.013299604572
    15
    near2025-04-25 00:00:00.0000.0017058162053
    16
    aptos2025-04-25 00:00:00.0000.00083729995394
    17
    ethereum2025-04-24 00:00:00.0000.43956043391
    18
    solana2025-04-24 00:00:00.0000.011416538292
    19
    near2025-04-24 00:00:00.0000.0016365476363
    20
    aptos2025-04-24 00:00:00.0000.00078143405654
    ...
    124
    6KB
    124s