Query editor
--single validator lookup https://dune.com/queries/3269462withlsts as (--s/o ashpool https://x.com/solanobahn/status/1706340214699159859?s=20SELECT*FROM (values('6WecYymEARvjG5ZyqkrVQ6YkhPfujNzWpSPwNKXHCbV2', '6WecYymEARvjG5ZyqkrVQ6YkhPfujNzWpSPwNKXHCbV2', 'rsrxDvYUXjH1RQj2Ke36LNZEVqGztATxFkqNukERqFT', 'bSOL')) as v(w_authority, s_authority, reserve, lst)), stake_accounts as (--get latest vote and authority for each stake accountSELECTvote.stake_account_raw, vote.vote_account_raw, auth.authorityFROM dune.dune.result_solana_stake_accounts_vote_delegates as voteLEFT JOIN dune.dune.result_solana_stake_accounts_authorities as auth ON vote.stake_account_raw = auth.stake_account_rawWHERE 1=1and vote.latest = 1and auth.latest = 1), base as (SELECTget_href(get_chain_explorer('solana') || '/account/' || stake_account_raw , stake_account_raw ) as stake_account, stake_account_raw, get_href(get_chain_explorer('solana') || '/account/' || vote_account_raw , COALESCE('🆔 ' || v_name.name, substring(vote_account_raw,1,10) || '...')) as vote_account, vote_account_raw, authority, lsts.lst, bal.sol_balance*(case when '{{currency}}' = 'USD' then p.price else 1 end) as sol_balanceFROM stake_accountsLEFT JOIN query_3268094 v_name ON v_name.validator = vote_account_rawJOIN solana_utils.latest_balances as bal ON bal.address = stake_account_rawLEFT JOIN lsts ON lsts.w_authority = authorityLEFT JOIN prices.usd_latest p ON p.blockchain = 'solana' and p.symbol = 'SOL'WHERE 1=1and bal.sol_balance > 0and vote_account_raw is not null --has been delegated. should check this once in a while to make sure I'm not missing any. Last check had one account of 64 SOL that appeared here.), total_vote_stake as (withtotal_stake as (SELECTsum(sol_balance) as total_sol_stakedFROM base), active_vote as (SELECTdistinct account_keys[2] as valFROM solana.vote_transactionsWHERE block_time > now() - interval '1' day)SELECT