Monad Data Engineelated-magenta
    Updated 3 days ago
    WITH hourly_metrics AS (
    SELECT
    DATE_TRUNC('hour', block_timestamp) AS hour,
    COUNT(DISTINCT from_address) AS hourly_wallets,
    COUNT(tx_hash) AS hourly_transactions,
    SUM(tx_fee) AS hourly_fees
    FROM MONAD.testnet.fact_transactions
    WHERE block_timestamp >= CURRENT_TIMESTAMP - INTERVAL '24 hours'
    GROUP BY DATE_TRUNC('hour', block_timestamp)
    ),
    new_wallets_hourly AS (
    SELECT
    DATE_TRUNC('hour', first_tx_time) AS hour,
    COUNT(DISTINCT from_address) AS new_wallets
    FROM (
    SELECT
    from_address,
    MIN(block_timestamp) AS first_tx_time
    FROM MONAD.testnet.fact_transactions
    WHERE block_timestamp >= CURRENT_TIMESTAMP - INTERVAL '24 hours'
    GROUP BY from_address
    )
    GROUP BY DATE_TRUNC('hour', first_tx_time)
    )
    SELECT
    h.hour,
    h.hourly_wallets AS "👛 Hourly Active Wallets",
    COALESCE(n.new_wallets, 0) AS "🆕 New Wallets per Hour",
    h.hourly_transactions AS "💫 Hourly Transactions",
    h.hourly_fees AS "💰 Hourly Fees",
    SUM(h.hourly_wallets) OVER (ORDER BY h.hour) AS "📈 Cumulative Wallets (24h)",
    SUM(h.hourly_transactions) OVER (ORDER BY h.hour) AS "🔄 Cumulative Transactions (24h)",
    SUM(h.hourly_fees) OVER (ORDER BY h.hour) AS "💎 Cumulative Fees (24h)"
    FROM hourly_metrics h
    LEFT JOIN new_wallets_hourly n ON h.hour = n.hour
    ORDER BY h.hour;
    Last run: 3 days ago
    HOUR
    👛 Hourly Active Wallets
    🆕 New Wallets per Hour
    💫 Hourly Transactions
    💰 Hourly Fees
    📈 Cumulative Wallets (24h)
    🔄 Cumulative Transactions (24h)
    💎 Cumulative Fees (24h)
    1
    2025-03-16 23:00:00.0001005021005022353531643.8978628631005022353531643.897862863
    2
    2025-03-17 00:00:00.0002247352149976151544370.2617642843252378505076014.159627147
    3
    2025-03-17 01:00:00.0002268772047476521894832.04178981552114150269610846.201416957
    4
    2025-03-17 02:00:00.0002432802024697350845789.525065238795394223778016635.726482195
    5
    2025-03-17 03:00:00.0002299781745067354775930.1462586731025372297325722565.872740867
    6
    2025-03-17 04:00:00.0002385061733367472436089.8933190811263878372050028655.766059949
    7
    2025-03-17 05:00:00.0002533801843018191536672.3248167361517258453965335328.090876684
    8
    2025-03-17 06:00:00.0002604101907418494926957.1645540441777668538914542285.255430728
    9
    2025-03-17 07:00:00.0002231051532777486356767.1101548972000773613778049052.365585625
    10
    2025-03-17 08:00:00.0002583321973988374797124.8127636212259105697525956177.178349247
    11
    2025-03-17 09:00:00.0002524601889457844816591.1450525022511565775974062768.323401749
    12
    2025-03-17 10:00:00.0002601071863407154506549.7726047542771672847519069318.096006502
    13
    2025-03-17 11:00:00.0002499471737877124046708.5571290243021619918759476026.653135526
    14
    2025-03-17 12:00:00.0002523481756738217856949.33968977132739671000937982975.992825297
    15
    2025-03-17 13:00:00.0003353642561279515887722.21421757936093311096096790698.207042877
    16
    2025-03-17 14:00:00.00032572024640410010988230.77206607339350511196206598928.97910895
    17
    2025-03-17 15:00:00.0003116282201818597617819.492895467424667912821826106748.472004417
    18
    2025-03-17 16:00:00.0002534351627297806306803.960092317450011413602456113552.432096734
    19
    2025-03-17 17:00:00.00029188120035082753710134.551635842479199514429993123686.983732576
    20
    2025-03-17 18:00:00.0002289121507788235417901.370200726502090715253534131588.353933302
    24
    2KB
    7s