Query editor
-- ============================================================-- Solana - Combined Stablecoin DEX Volume + Transfer Volume-- ============================================================---- OUTPUT COLUMNS EXPLAINED:-- ─────────────────────────────────────────────────────────────-- date-- The calendar day (UTC)---- Total DEX Volume-- Sum of all stablecoin token units traded on Solana DEXes-- that day across ALL tracked stablecoins (both bought + sold-- sides counted). Source: dex_solana.trades-- Formula: SUM(token_bought_amount) + SUM(token_sold_amount)-- for each stablecoin mint address---- Total Transfer Volume-- Sum of all stablecoin token units transferred on-chain-- that day across ALL tracked stablecoins. Excludes mints,-- burns, and self-transfers. Source: stablecoins_solana.transfers-- Formula: SUM(amount) WHERE action = 'transfer'---- {TOKEN}_dex_vol-- DEX volume in token units for that specific stablecoin.-- Each swap contributes to BOTH the bought and sold token's-- volume (same as Ethereum query methodology).-- e.g. USDC_dex_vol = USDC bought + USDC sold in DEX swaps---- {TOKEN}_transfer_vol-- On-chain transfer volume in token units for that stablecoin.-- Pure wallet-to-wallet transfers only — mints and burns-- are excluded via action = 'transfer' filter.---- ─────────────────────────────────────────────────────────────-- STABLECOINS TRACKED (Solana mint addresses):-- USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v-- USDT Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB-- PYUSD 2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo-- USDe DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT-- ─────────────────────────────────────────────────────────────-- NOTE: Solana uses mint addresses (not EVM contract addresses)-- dex_solana.trades uses token_bought_mint_address /-- token_sold_mint_address for joins (not token_address)-- ─────────────────────────────────────────────────────────────WITHparams AS (SELECT DATE '2023-01-01' AS start_day),stable_tokens AS (SELECT * FROM (VALUES('USDC', 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'),('USDT', 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'),('PYUSD', '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo'),('USDe', 'DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT')) AS t(symbol, mint_address)),