Query editor
WITHvote_cast AS (SELECT evt_tx_hash, evt_block_time, proposalid, voter FROM compound_v2_ethereum.GovernorBravoDelegate_evt_VoteCastUNION ALLSELECT evt_tx_hash, evt_block_time, proposalid, voter FROM compound_ethereum.compoundgovernor_evt_votecast),votes_costs AS (SELECTvc.evt_tx_hash,vc.evt_block_time,vc.proposalid,tr."from",vc.voter,tr.gas_used,tr.gas_price / 1e18 AS gas_price,p.price,(tr.gas_used * (tr.gas_price / 1e18)) * p.price AS usd,tr.gas_used * (tr.gas_price / 1e18) AS ethFROM vote_cast AS vcLEFT JOIN ethereum.transactions AS tr ON vc.evt_tx_hash = tr.hashLEFT JOIN prices.usd AS p ON date_trunc('minute', vc.evt_block_time) = p.minuteAND p.contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)SELECTcount(distinct evt_tx_hash) AS txs,sum(eth) AS eth,sum(usd) AS usdFROM votes_costs;