potmoFeb 7 5:08-5:35
    Updated 2025-02-24
    with time_series as (
    select '{{aggregation_period}}' as aggregation_period,
    date_trunc('{{aggregation_period}}', block_timestamp) as time_unit,
    case
    when block_number between 1 and 3218635 then 'Before Gas Limit Halving: 300M gas limit'
    when block_number between 3218636 and 3982324 then 'After Limit Halving and Testnet Launch'
    when block_number > 3982324 then 'After launch'
    end as interval_name,
    case
    -- when aggregation_period = 'second' then sum(tx_count) / (60 * 60 * 60 * 60)
    when aggregation_period = 'minute' then sum(tx_count) / (60 )
    when aggregation_period = 'hour' then sum(tx_count) / (60*60)
    when aggregation_period = 'day' then sum(tx_count) / (24*60*60)
    when aggregation_period = 'week' then sum(tx_count) / (7*24*60*60)
    -- when aggregation_period = 'month' then sum(tx_count) / (30*7*24*60*60)
    end as transactions_per_second,
    avg(gas_used / nullif(gas_limit,0)) as block_utilization_rate,
    sum(gas_limit) as total_gas_limit,
    sum(tx_count) as tx_count,
    sum (gas_used * 50) as total_tx_fees,
    sum(gas_used) as total_gas_used,
    avg(tx_count) as avg_txs,
    avg(gas_used*50) as avg_tx_fee,
    avg(gas_used) as avg_gas_used,
    avg(block_number) as avg_blocks
    from monad.testnet.fact_blocks
    where block_number <> 0
    and block_timestamp between '2025-02-07 17:08:00.000' and '2025-02-07 17:38:00.000'
    --and block_timestamp between '2025-02-07 16:10:00.000' and '2025-02-07 16:47:00.000'
    -- and block_timestamp between '2025-02-07 15:59:00.000' and '2025-02-07 18:00:00.000'
    -- and block_timestamp between '2025-01-24 16:00' and '2025-01-24 17:59'
    -- and block_timestamp between '2025-01-24 15:59:00.000' and '2025-01-24 17:20:00.000'
    group by 1,2,3
    ),
    final as (
    select time_unit as {{aggregation_period}},
    Last run: 20 days ago
    MINUTE
    TRANSACTIONS_PER_SECOND
    INTERVAL_NAME
    Average
    10MA
    30MA
    60MA
    1
    2025-02-07 17:08:00.0001241.683333Before Gas Limit Halving: 300M gas limit1241.6833331241.6833331241.6833331241.683333
    2
    2025-02-07 17:09:00.0002083.333333Before Gas Limit Halving: 300M gas limit1662.5083331662.5083331662.5083331662.508333
    3
    2025-02-07 17:10:00.0002008.333333Before Gas Limit Halving: 300M gas limit1777.7833331777.7833331777.7833331777.783333
    4
    2025-02-07 17:11:00.0001993.333333Before Gas Limit Halving: 300M gas limit1831.6708331831.6708331831.6708331831.670833
    5
    2025-02-07 17:12:00.0001991.95Before Gas Limit Halving: 300M gas limit1863.72666641863.72666641863.72666641863.7266664
    6
    2025-02-07 17:13:00.0001878.033333Before Gas Limit Halving: 300M gas limit1866.1111108333331866.1111108331866.1111108331866.111110833
    7
    2025-02-07 17:14:00.0002131.316667Before Gas Limit Halving: 300M gas limit1903.9976188571431903.9976188571903.9976188571903.997618857
    8
    2025-02-07 17:15:00.0001966.733333Before Gas Limit Halving: 300M gas limit1911.8395831251911.8395831251911.8395831251911.839583125
    9
    2025-02-07 17:16:00.0002008.35Before Gas Limit Halving: 300M gas limit1922.5629627777781922.5629627771922.5629627771922.562962777
    10
    2025-02-07 17:17:00.0002000.016667Before Gas Limit Halving: 300M gas limit1930.30833321930.30833321930.30833321930.3083332
    11
    2025-02-07 17:18:00.0001993.35Before Gas Limit Halving: 300M gas limit1936.0393938181821936.0393938181936.0393938181936.039393818
    12
    2025-02-07 17:19:00.0002003.283333Before Gas Limit Halving: 300M gas limit1941.6430554166672005.2757574541941.6430554161941.643055416
    13
    2025-02-07 17:20:00.0002000Before Gas Limit Halving: 300M gas limit1946.1320511538461997.6999999091946.1320511531946.132051153
    14
    2025-02-07 17:21:00.0002008.366667Before Gas Limit Halving: 300M gas limit1950.5773808571431997.7030302721950.5773808571950.577380857
    15
    2025-02-07 17:22:00.0001954.733333Before Gas Limit Halving: 300M gas limit1950.8544443333331994.1939393631950.8544443331950.854444333
    16
    2025-02-07 17:23:00.0002035.133333Before Gas Limit Halving: 300M gas limit1956.1218748751998.1196969091956.1218748751956.121874875
    17
    2025-02-07 17:24:00.0002001.683333Before Gas Limit Halving: 300M gas limit1958.8019606470592009.3606061958.8019606471958.801960647
    18
    2025-02-07 17:25:00.0002000.016667Before Gas Limit Halving: 300M gas limit1961.0916665555561997.4242423631961.0916665551961.091666555
    19
    2025-02-07 17:26:00.0001966.683333Before Gas Limit Halving: 300M gas limit1961.3859647894741997.4196969091961.3859647891961.385964789
    20
    2025-02-07 17:27:00.0002008.333333Before Gas Limit Halving: 300M gas limit1963.73333321997.4181817271963.73333321963.7333332
    31
    4KB
    2s