Query editor
WITHproposals_created AS (SELECTevt_tx_hash,evt_block_time,proposer,id AS proposalIdFROMcompound_v2_ethereum.GovernorBravoDelegate_evt_ProposalCreatedUNION ALLSELECTevt_tx_hash,evt_block_time,proposer,proposalIdFROMcompound_ethereum.compoundgovernor_evt_proposalcreated),ProposalDetails AS (SELECTproposer,proposalId,DATE_TRUNC('month', evt_block_time) AS proposal_month,t.gas_used * t.gas_price / 1e18 AS gas_cost_ethFROMproposals_created pINNER JOIN ethereum.transactions t ON p.evt_tx_hash = t.hash),MonthlyGasCost AS (SELECTproposer,proposal_month,SUM(gas_cost_eth) AS total_gas_cost_ethFROMProposalDetailsGROUP BYproposer,proposal_month)SELECTproposal_month,proposer,total_gas_cost_ethFROMMonthlyGasCostORDER BYproposal_month DESC,total_gas_cost_eth DESC;