Query editor
withcreated_accounts as (SELECTaccount_newAccount, max_by(call_outer_executing_account, call_block_time) as call_outer_executing_accountFROM(SELECT account_newAccount, call_outer_executing_account, call_block_time FROM system_program_solana.system_program_call_CreateAccountUNION ALLSELECT account_newAccount, call_outer_executing_account, call_block_time FROM system_program_solana.system_program_call_CreateAccountWithSeedUNION ALLSELECT account_account as account_newAccount, call_outer_executing_account, call_block_time FROM spl_token_solana.spl_token_call_initializeAccountUNION ALLSELECT account_account as account_newAccount, call_outer_executing_account, call_block_time FROM spl_token_solana.spl_token_call_initializeAccount2UNION ALLSELECT account_account as account_newAccount, call_outer_executing_account, call_block_time FROM spl_token_solana.spl_token_call_initializeAccount3)group by 1)SELECTCOALESCE('✅ ' ||casewhen d_tk.name is not null then d_tk.namewhen c.call_outer_executing_account = '11111111111111111111111111111111'OR c.call_outer_executing_account = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'OR c.call_outer_executing_account = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'then '👤 wallet'end, c.call_outer_executing_account)as parent_program, sum(token_balance) as bsol_balance, cardinality(array_agg(distinct b.address)) as num_token_accounts, arbitrary(b.address) as example_accountFROM solana_utils.latest_balances bLEFT JOIN dune.dune.result_solana_defi_token_accounts d_tk ON d_tk.address = b.addressLEFT JOIN created_accounts c ON c.account_newAccount = b.addressWHERE b.token_mint_address = 'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1'GROUP BY 1HAVING sum(token_balance) > 1000ORDER BY sum(token_balance) desc