Query editor
WITH base AS (selectCASEWHEN gas_limit = 30000000 THEN 'slow'WHEN gas_limit = 2000000 THEN 'fast'WHEN gas_limit = 3000000 THEN 'fast'END AS block_type,date_trunc('day', time) as day,*from hyperevm.blocks),daily AS (selectday,block_type,sum(gas_used) as gas_usedfrom basegroup by 1,2)selectday,block_type,gas_used,CAST((SELECT COUNT(*) FROM base where block_type='slow' and gas_used <> 0) AS double)*100.0/CAST((SELECT COUNT(*) FROM base where block_type='slow') AS double)*1.0 as slow_blocks_used_pct,CAST((SELECT COUNT(*) FROM base where block_type='fast' and gas_used <> 0) as double)*100.0/CAST((SELECT COUNT(*) FROM base where block_type='fast') as double)*1.0 as fast_blocks_used_pctfrom dailywhere day >= date'2025-02-18'