datavortexavg feees per block
    Updated 2024-12-08
    WITH usd_conversion AS (
    SELECT
    avg(price) AS near_price_usd
    FROM
    near.price.ez_prices_hourly
    WHERE
    symbol = 'NEAR'
    AND hour >= '2024-01-01'
    AND hour <= '2024-12-31'
    ),
    transactions_with_gas AS (
    SELECT
    tx_hash,
    block_hash,
    transaction_fee,
    block_timestamp
    FROM
    near.core.fact_transactions
    WHERE
    block_timestamp >= '2024-01-01'
    AND block_timestamp <= '2024-12-31'
    AND tx_succeeded = TRUE
    ),
    transactions_with_price AS (
    SELECT
    t.tx_hash,
    t.block_hash,
    t.transaction_fee,
    t.block_timestamp,
    u.near_price_usd
    FROM
    transactions_with_gas t
    CROSS JOIN
    usd_conversion u
    )
    SELECT
    QueryRunArchived: QueryRun has been archived