Query editor
WITHproposals_canceled AS (SELECT evt_tx_hash, evt_block_time FROM compound_v2_ethereum.GovernorBravoDelegate_evt_ProposalCanceledUNION ALLSELECT evt_tx_hash, evt_block_time FROM compound_ethereum.compoundgovernor_evt_proposalcanceled),proposals_queued AS (SELECT evt_tx_hash, evt_block_time FROM compound_v2_ethereum.GovernorBravoDelegate_evt_ProposalQueuedUNION ALLSELECT evt_tx_hash, evt_block_time FROM compound_ethereum.compoundgovernor_evt_proposalqueued),proposals_executed AS (SELECT evt_tx_hash, evt_block_time FROM compound_v2_ethereum.GovernorBravoDelegate_evt_ProposalExecutedUNION ALLSELECT call_tx_hash AS evt_tx_hash, call_block_time AS evt_block_time FROM compound_ethereum.compoundgovernor_call_execute where call_success = true),maintenance_costs AS (SELECTt1.evt_tx_hash,t1.evt_block_time,t2."from",t2.gas_used,t2.gas_price / 1e18 AS gas_price,t3.price,(t2.gas_used * (t2.gas_price / 1e18)) * t3.price AS usd,t2.gas_used * (t2.gas_price / 1e18) AS ethFROM proposals_canceled AS t1LEFT JOIN ethereum.transactions AS t2 ON t1.evt_tx_hash = t2.hashLEFT JOIN prices.usd AS t3 ON date_trunc('minute', t1.evt_block_time) = t3.minuteAND t3.contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2UNION ALLSELECTt1.evt_tx_hash,t1.evt_block_time,t2."from",t2.gas_used,t2.gas_price / 1e18 AS gas_price,t3.price,(t2.gas_used * (t2.gas_price / 1e18)) * t3.price AS usd,t2.gas_used * (t2.gas_price / 1e18) AS ethFROM compound_v2_ethereum.GovernorBravoDelegate_evt_ProposalQueued AS t1LEFT JOIN ethereum.transactions AS t2 ON t1.evt_tx_hash = t2.hashLEFT JOIN prices.usd AS t3 ON date_trunc('minute', t1.evt_block_time) = t3.minuteAND t3.contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2UNION ALLSELECTt1.evt_tx_hash,t1.evt_block_time,t2."from",t2.gas_used,t2.gas_price / 1e18 AS gas_price,t3.price,(t2.gas_used * (t2.gas_price / 1e18)) * t3.price AS usd,t2.gas_used * (t2.gas_price / 1e18) AS ethFROM proposals_executed AS t1LEFT JOIN ethereum.transactions AS t2 ON t1.evt_tx_hash = t2.hash