Query editor
-- Solana pool leaderboard. Blank or all resets the mint; exact mint matches are case-sensitive.-- Dune's swap table records individual pool fills, including routed fills.-- Pool creation coverage is protocol-specific; a creation record does not prove a pool is still open.WITH input AS (SELECT CAST(NULL AS varchar) AS mint,1 AS page_number,CAST(date_trunc('day', current_timestamp AT TIME ZONE 'UTC') AS timestamp) AS as_of_utc), mode AS (SELECT mint, as_of_utc, page_number, coalesce(lower(mint), 'all') = 'all' AS is_allFROM input), params AS (SELECT *, as_of_utc - IF(is_all, INTERVAL '7' DAY, INTERVAL '30' DAY) AS activity_start_utcFROM modeWHERE is_all OR (regexp_like(mint, '^[1-9A-HJ-NP-Za-km-z]{32,44}$')AND length(try(from_base58(mint))) = 32)), mint_params AS (SELECT mint FROM params WHERE NOT is_all), pool_creations AS (SELECT 'Raydium' AS platform, 'AMM v4' AS pool_type, "account_amm" AS pool_address,IF("account_coinMintAddress" = p.mint, "account_pcMintAddress", "account_coinMintAddress") AS paired_mint, call_block_time AS created_atFROM raydium_amm_solana.raydium_amm_call_initializeCROSS JOIN mint_params pWHERE ("account_coinMintAddress" = p.mint OR "account_pcMintAddress" = p.mint)UNION ALLSELECT 'Raydium' AS platform, 'AMM v4' AS pool_type, "account_amm" AS pool_address,IF("account_coinMint" = p.mint, "account_pcMint", "account_coinMint") AS paired_mint, call_block_time AS created_atFROM raydium_amm_solana.raydium_amm_call_initialize2CROSS JOIN mint_params pWHERE ("account_coinMint" = p.mint OR "account_pcMint" = p.mint)UNION ALLSELECT 'Raydium' AS platform, 'CPMM' AS pool_type, "account_poolState" AS pool_address,IF("account_token0Mint" = p.mint, "account_token1Mint", "account_token0Mint") AS paired_mint, call_block_time AS created_atFROM raydium_cp_solana.raydium_cp_swap_call_initializeCROSS JOIN mint_params pWHERE ("account_token0Mint" = p.mint OR "account_token1Mint" = p.mint)UNION ALLSELECT 'Raydium' AS platform, 'CLMM' AS pool_type, "poolState" AS pool_address,IF("tokenMint0" = p.mint, "tokenMint1", "tokenMint0") AS paired_mint, evt_block_time AS created_atFROM raydium_clmm_solana.amm_v3_evt_poolcreatedeventCROSS JOIN mint_params pWHERE "tokenMint0" = p.mint OR "tokenMint1" = p.mintUNION ALLSELECT 'Orca' AS platform, 'Whirlpool' AS pool_type, "account_whirlpool" AS pool_address,IF("account_tokenMintA" = p.mint, "account_tokenMintB", "account_tokenMintA") AS paired_mint, call_block_time AS created_atFROM whirlpool_solana.whirlpool_call_initializepoolCROSS JOIN mint_params pWHERE ("account_tokenMintA" = p.mint OR "account_tokenMintB" = p.mint)UNION ALLSELECT 'Orca' AS platform, 'Whirlpool' AS pool_type, "account_whirlpool" AS pool_address,IF("account_tokenMintA" = p.mint, "account_tokenMintB", "account_tokenMintA") AS paired_mint, call_block_time AS created_atFROM whirlpool_solana.whirlpool_call_initializepoolv2CROSS JOIN mint_params pWHERE ("account_tokenMintA" = p.mint OR "account_tokenMintB" = p.mint)UNION ALLSELECT 'Orca' AS platform, 'Whirlpool (adaptive fee)' AS pool_type, "account_whirlpool" AS pool_address,IF("account_tokenMintA" = p.mint, "account_tokenMintB", "account_tokenMintA") AS paired_mint, call_block_time AS created_atFROM whirlpool_solana.whirlpool_call_initializepoolwithadaptivefeeCROSS JOIN mint_params pWHERE ("account_tokenMintA" = p.mint OR "account_tokenMintB" = p.mint)UNION ALL