Query editor
-- gas limit can change by 1/1024 per block-- literally hate tracking the data like this. bleh.WITH gas_change AS (SELECTtime,number,gas_limit,gas_limit - LAG(gas_limit) OVER (ORDER BY time) AS gas_deltaFROM ethereum.blocksWHEREtime >= CAST('2024-10-01' AS TIMESTAMP)),gas_categorized as (select*,casewhen gas_limit = 36e6 then 'Limit = 36M' -- will never land perfectly on these levels w/out that being the targetwhen gas_limit = 30e6 then 'Limit = 30M' -- will never land perfectly on these levels w/out that being the targetwhen gas_limit > 36.001e6 AND gas_delta > 0 then 'Increasing & Limit > 36M'when gas_limit > 30e6 AND gas_delta > 0 then 'Increasing & Limit > 30M'when gas_limit < 30e6 AND gas_delta < 0 then 'Decreasing & Limit < 30M'when gas_limit > 36.001e6 AND gas_delta < 0 then 'Decreasing & Limit > 36M'when gas_limit < 36e6 AND gas_delta < 0 then 'Decreasing & Limit < 36M'else 'to-investigate'end as gas_regionfrom gas_change)selectDATE_TRUNC('day', time) AS time,gas_region,count(*) as count_eventsfrom gas_categorizedgroup by 1, 2