Query editor
WITHtransaction_prices AS (SELECTgas_price,"hash" AS tx_hash,block_timeFROMethereum.transactions),event_data AS (SELECTevt_tx_hash,contract_address,gas_price,'swap' AS event_type,2780 AS event_gas,DATE_FORMAT(block_time, '%Y-%m') AS monthFROMuniswap_v3_ethereum.Pair_evt_Swap AS eINNER JOIN transaction_prices AS t ON e.evt_tx_hash = t.tx_hashUNION ALLSELECTevt_tx_hash,contract_address,gas_price,'burn' AS event_type,1893 AS event_gas,DATE_FORMAT(block_time, '%Y-%m') AS monthFROMuniswap_v3_ethereum.Pair_evt_Burn AS eINNER JOIN transaction_prices AS t ON e.evt_tx_hash = t.tx_hashUNION ALLSELECTevt_tx_hash,contract_address,gas_price,'mint' AS event_type,2899 AS event_gas,DATE_FORMAT(block_time, '%Y-%m') AS monthFROMuniswap_v3_ethereum.Pair_evt_Mint AS eINNER JOIN transaction_prices AS t ON e.evt_tx_hash = t.tx_hashUNION ALLSELECTevt_tx_hash,contract_address,gas_price,'collect' AS event_type,2643 AS event_gas,DATE_FORMAT(block_time, '%Y-%m') AS monthFROMuniswap_v3_ethereum.Pair_evt_Collect AS eINNER JOIN transaction_prices AS t ON e.evt_tx_hash = t.tx_hash)SELECTmonth,SUM(TRY_CAST((gas_price * event_gas) AS REAL) / 1e18) AS total_gasFROMevent_dataGROUP BY