Query editor
withlsts as (SELECTw_authority as authority, reserve, lstFROM query_3711279UNION ALLSELECTlst as authority, reserve, lstFROM query_3708918), lst_accounts as (SELECTdistinctstake_account_raw as address, authorityFROM dune.dune.result_solana_stake_accounts_authoritiesWHERE authority IN (SELECT authority FROM lsts)and latest = 1UNIONSELECTreserve as address, authorityFROM lstsUNIONSELECTaccount_stakeAccount as address, 'stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq' as authorityFROM stake_program_solana.stake_call_DelegateStakeWHERE account_stakeAuthority IN ('stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq','ex9CfkBZZd6Nv9XdnoDmmB45ymbu4arXVk7g5pWnt3N','noMa7dN4cHQLV4ZonXrC29HTKFpxrpFbDLK5Gub8W8t','exGQS9BR9Y1zLf36iM4pqHCDGoj2HChcjzu6kQTV2Ju')UNIONSELECTreserve as address, lst as authorityFROM query_3708918), stake_accounts as (SELECT account_stakeAccount as stake FROM stake_program_solana.stake_call_InitializeUNIONSELECT account_stakeAccount as stake FROM stake_program_solana.stake_call_InitializeCheckedUNIONSELECT case when action = 'withdraw' then source --if withdraw, then stake account is the withdraw account.else destination --if merge or split, then both are stake accounts.end as stakeFROM staking_solana.stake_actionsUNIONSELECTreserve as addressFROM lstsUNIONSELECT