datavortexTotals
    Updated 4 days ago
    WITH total_seconds AS (
    SELECT
    365 * 24 * 60 * 60 AS total_seconds_in_2025
    ),
    MATICPrice AS (
    SELECT
    AVG(price) AS matic_price
    FROM
    polygon.price.ez_prices_hourly
    WHERE
    symbol = 'MATIC'
    ),
    transaction_metrics AS (
    SELECT
    COUNT(DISTINCT tx_hash) AS total_transactions,
    COUNT(DISTINCT from_address) AS active_users,
    SUM(tx_fee) AS total_gas,
    AVG(tx_fee) AS avg_transaction_fee,
    COUNT(DISTINCT tx_hash) / (365 * 24 * 60 * 60) AS avg_transactions_per_second,
    SUM(tx_fee) / COUNT(DISTINCT tx_hash) AS avg_gas_fee_per_transaction,
    SUM(tx_fee) / COUNT(DISTINCT from_address) AS avg_gas_spent_per_user
    FROM
    polygon.core.fact_transactions
    WHERE
    block_timestamp >= '2025-01-01'
    AND block_timestamp <= '2025-12-31'
    AND tx_succeeded = 'True'
    ),
    gas_conversion AS (
    SELECT
    tm.total_transactions,
    tm.active_users,
    tm.total_gas,
    tm.avg_transaction_fee,
    tm.avg_transactions_per_second,
    tm.avg_gas_fee_per_transaction,
    Last run: 4 days ago
    TOTAL_TRANSACTIONS
    ACTIVE_USERS
    TOTAL_GAS
    AVG_TRANSACTION_FEE
    AVG_TRANSACTIONS_PER_SECOND
    AVG_GAS_FEE_PER_TRANSACTION
    AVG_GAS_SPENT_PER_USER
    TOTAL_GAS_IN_USD
    AVG_TRANSACTION_FEE_IN_USD
    AVG_GAS_FEE_PER_TRANSACTION_IN_USD
    AVG_GAS_SPENT_PER_USER_IN_USD
    1
    448063231203813597456131.282533360.0166408014914.2079920.016640801490.36583091854616928.430492160.010304189480.010304189480.2265270157
    1
    148B
    29s