Query editor
withtxs as (selectt1.block_time,t1.blockchain,casewhen t1.blockchain = 'optimism' then --'Optimism'(t1.l1_fee / 1e18) + t1.gas_used * (t1.gas_price / 1e18)when t1.blockchain = 'zksync' then --'zkSync't1.gas_used * (t1.gas_price / 1e18)when t1.blockchain = 'base' then --'Base'(t1.l1_fee / 1e18) + t1.gas_used * (t1.gas_price / 1e18)when t1.blockchain = 'arbitrum' then --'Arbitrum'((t1.effective_gas_price) * t1.gas_used) / 1e18when t1.blockchain = 'zora' then --'Zora'(t1.l1_fee / 1e18) + t1.gas_used * (t1.gas_price / 1e18)when t1.blockchain = 'scroll' then --'Scroll'(t1.l1_fee / 1e18) + t1.gas_used * (t1.gas_price / 1e18)end as total_feefromevms.transactions as t1wheret1.blockchain in ('optimism','base','zora','zksync','arbitrum','scroll')and t1.block_time between from_unixtime(1710338135) - interval '{{before_upgrade_days}}' day and from_unixtime(1710338135) + interval '{{after_upgrade_days}}' day --EIP-4844 Upgrade: unixtime(1710338135), 2024-03-13 13:55union allselectblock_time,'linea' as blockchain,gas_used * (gas_price / 1e18) as total_feefromlinea.transactionswhereblock_time between from_unixtime(1710338135) - interval '{{before_upgrade_days}}' day and from_unixtime(1710338135) + interval '{{after_upgrade_days}}' day --EIP-4844 Upgrade: unixtime(1710338135), 2024-03-13 13:55union allselectblock_time,'blast' as blockchain,(l1_fee / 1e18) + gas_used * (gas_price / 1e18) as total_feefromblast.transactionswhereblock_time between from_unixtime(1710338135) - interval '{{before_upgrade_days}}' day and from_unixtime(1710338135) + interval '{{after_upgrade_days}}' day --EIP-4844 Upgrade: unixtime(1710338135), 2024-03-13 13:55),tx_prices as (selectt1.*,t2.pricefromtxs as t1left join prices.usd as t2 on date_trunc('minute', t1.block_time) = t2.minuteand t2.contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)