Query editor
with vote_result as (select proposalid,count(distinct voter) as total_voters,sum(case when support =1 then cast(weight/1e18 as double) else 0 end) as support_vote,sum(case when support =0 then cast(weight/1e18 as double) else 0 end) as against_vote,sum(case when support =2 then cast(weight/1e18 as double) else 0 end) as abstain_vote,sum(cast(weight/1e18 as double)) as total_votefrom arbitrum_arbitrum.L2ArbitrumGovernor_evt_VoteCastwhere weight > 0group by 1)selectproposal_index,proposalid,time,tally,category,theme,description as proposal,proposal_type,proposer,casewhen category in ('Cancelled') then 'Cancelled'when category in ('Testing') then 'Testing'when coalesce(extendblock, endBlock)>blk_num then 'Active'when support_vote+abstain_vote>quorum_requirementand support_vote>against_votethen 'Passed'when support_vote+abstain_vote<quorum_requirement then 'Quorum not Reached'when against_vote>support_vote then 'Rejected'end as status,quorum_requirement,(support_vote+abstain_Vote)/quorum_requirement as quorum_progress,votable,total_vote,total_vote/votable as participation_rate,total_voters,support_vote,against_vote,abstain_Vote,evt_tx_hash,symbol,amount,usd_amountfrom (selectrank() over (order by a.evt_block_time asc) as proposal_index,a.evt_block_time as time,a.proposalId,case when a.contract_address=0x789fc99093b09ad01c34dc7251d0c89ce743e5a4 then 'Non-Constitutional AIP' else 'Constitutional AIP'end as proposal_type,case when a.contract_address=0x789fc99093b09ad01c34dc7251d0c89ce743e5a4 then non_con_quorum else con_quorum end asquorum_requirement,h.tally,h.category,h.theme,h.description,CONCAT('<a href="https://www.tally.xyz/gov/arbitrum/delegate/',CAST(proposer as varchar),