Query editor
with votes as (select proposalid,sum(case when support=1 then votes/1e18 end) as for_,sum(case when support=0 then votes/1e18 end) as against,sum(case when support=2 then votes/1e18 end) as obstainfrom compound_v2_ethereum.GovernorBravoDelegate_evt_VoteCastgroup by 1)select t1.id, proposer, ens.name AS proposer_ens, date_format(t1.evt_block_time, '%M-%d-%Y') as time, startblock, endblock, substring(description,1,40)||'..' as description, t2.for_, t2.against, t2.obstain,case when t2.for_>400000 and t2.for_>(case when t2.against is null then 0 else t2.against end) then 'PASSED'when t3.id is not null then 'CANCELLED'else 'REVIEW' end as outcomefrom compound_v2_ethereum.GovernorBravoDelegate_evt_ProposalCreated as t1LEFT JOIN labels.ens AS ens ON ens.address = proposerleft join votes as t2 on t1.id=t2.proposalidleft join (select distinct id from compound_v2_ethereum.GovernorBravoDelegate_evt_ProposalCanceled)as t3 on t1.id=t3.idorder by id desc