Query editor
SELECTdep.marketIndex,CASEWHEN aa.token_mint_address = '3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh' then 'WBTC'WHEN aa.token_mint_address = 'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1' then 'bSOL'ELSE tk.symbolEND as symbol,dep.account_spotMarketVault,bal.token_balance as market_balance,bal.token_balance * COALESCE(p.price, dp.median_price) as market_usd_balance,COUNT(*) as number_of_depositsFROM drift_v2_solana.drift_call_deposit depLEFT JOIN solana_utils.token_accounts aa ON aa.address = dep.account_userTokenAccountLEFT JOIN tokens_solana.fungible tk ON tk.token_mint_address = aa.token_mint_addressLEFT JOIN prices.usd_latest p ON p.blockchain = 'solana' and toBase58(contract_address) = aa.token_mint_addressLEFT JOIN dune.dune.result_dex_prices_latest_solana dp ON dp.token_mint_address = aa.token_mint_addressLEFT JOIN solana_utils.latest_balances bal ON bal.address = dep.account_spotMarketVaultWHERE aa.token_mint_address is not nullAND dep.marketIndex is not nullGROUP BY 1, 2, 3, 4, 5ORDER BY 5 DESC