Query editor
with transfers as(select*from (selectt.call_block_date, t.account_source, t.account_destination, t.account_authority, t.amountfrom spl_token_solana.spl_token_call_transferChecked t/*union allselectt.call_block_date, t.account_source, t.account_destination, t.account_authority, t.amountfrom spl_token_solana.spl_token_call_transfer t */) twheret.account_destination in ('7swzCFdv9oAZhRyNsnpd5FbXMh3wXop59JCmrJmosomB', /* YES */'9CKVf57dJUAG7YM9UPFoGDe5f8Tmfs21WWQDCGHdBfkQ', /* NO */'5zCHgsLwDoUHKVMbDA3oQT3mgHL4ggfRQR3VvuobVcTP' /* ABSTAIN */)and t.call_block_date > date '2025-03-07'),validator_votes as (/*select account_owner, sum(amount) amountfrom spl_token_solana.spl_token_call_minttowherecall_block_date > date '2025-03-05'and account_mint = 's228VmFcuiEfroSCQTvEp1pYUownL7JRZMTd7FqHJVK'group by account_owner*/selectrecipient,cast(amount as uint256) amountfrom dune.kagren0.dataset_simd228_proposal),binned as (selectcasewhen vv.amount < 100_000 * 1e9 then 0when vv.amount >= 100_000 * 1e9 and vv.amount < 250_000 * 1e9 then 1when vv.amount >= 250_000 * 1e9 and vv.amount < 500_000 * 1e9 then 2when vv.amount >= 500_000 * 1e9 and vv.amount < 1_000_000 * 1e9 then 3when vv.amount >= 1_000_000 * 1e9 then 4end bin,casewhen b.account_destination = '7swzCFdv9oAZhRyNsnpd5FbXMh3wXop59JCmrJmosomB' then 'Yes'when b.account_destination = '9CKVf57dJUAG7YM9UPFoGDe5f8Tmfs21WWQDCGHdBfkQ' then 'No'when b.account_destination = '5zCHgsLwDoUHKVMbDA3oQT3mgHL4ggfRQR3VvuobVcTP' then 'Abstain'end vote_type,count(distinct v.account) validatorsfrom validator_votes vvleft join dune.kagren0.result_validators v on vv.recipient = v.accountleft join transfers b on v.account = b.account_authoritygroup by 1, 2)selectbin,casewhen bin = 0 then '0-100k'when bin = 1 then '100k-250k'when bin = 2 then '250k-500k'