Query editor
with base as (selectblock_slot,token_balance_owner address,post_token_balance amountfrom solana.account_activity aawhere token_balance_owner in ('YESsimd228111111111111111111111111111111111', /* YES */'nosimd2281111111111111111111111111111111111', /* NO */'ABSTA1Nsimd22811111111111111111111111111111' /* ABSTAIN */)and token_mint_address = 's228VmFcuiEfroSCQTvEp1pYUownL7JRZMTd7FqHJVK'and block_time > date '2025-03-06'and block_slot <= 326592000),slots as (selectdistinct block_slot slotfrom base),refined as (selectblock_slot,casewhen address = 'YESsimd228111111111111111111111111111111111' then 'Yes'when address = 'nosimd2281111111111111111111111111111111111' then 'No'when address = 'ABSTA1Nsimd22811111111111111111111111111111' then 'Abstain'end Vote,amountfrom base)selects.slot,s.Vote,max(max(amount)) over (partition by s.Vote order by s.slot asc) Votes--sum(amount) over (/ 379050125089013001 VotesPctfrom (select s.*, b.Votefrom slots scross join (select 'Yes' Voteunion allselect 'No'union allselect 'Abstain') b) sleft join refined r on r.block_slot = s.slot and s.vote = r.votegroup by 1, 2order by s.slot, casewhen s.vote = 'Yes' then 0when s.vote = 'No' then 1when s.vote = 'Abstain' then 2end