Query editor
WITHvote_cast AS (SELECTvoter,proposalId,evt_block_time,evt_tx_hashFROMcompound_v2_ethereum.GovernorBravoDelegate_evt_VoteCastUNION ALLSELECTvoter,proposalId,evt_block_time,evt_tx_hashFROMcompound_ethereum.compoundgovernor_evt_votecast),VoteDetails AS (SELECTv.voter,v.proposalId,DATE_TRUNC('month', v.evt_block_time) AS vote_month,t.gas_used * t.gas_price / 1e18 AS gas_cost_ethFROMvote_cast vINNER JOIN ethereum.transactions t ON v.evt_tx_hash = t.hash),MonthlyGasCost AS (SELECTvoter,vote_month,SUM(gas_cost_eth) AS total_gas_cost_ethFROMVoteDetailsGROUP BYvoter,vote_month)SELECTvote_month,voter,total_gas_cost_ethFROMMonthlyGasCostORDER BYvote_month DESC,total_gas_cost_eth DESC;