Query editor
WITH traders_table AS (-- Selecting trades within October 2025 for the project 'raydium'SELECTblock_date, -- Date of the tradetrader_id, -- Unique trader identifieramount_usd, -- Trade amount in USDtoken_bought_mint_address, -- Address of the bought tokentoken_sold_mint_address, -- Address of the sold tokenfee_usd -- Fee in USDFROM dex_solana.tradesWHEREblock_date BETWEEN TRY_CAST('2025-10-01' AS DATE) AND TRY_CAST('2025-10-31' AS DATE)AND project = 'raydium'), First_time_traders_table AS (-- Identifying the first transaction date for each trader along with transaction detailsSELECTMIN(block_date) AS ay, -- The date of the first transaction for each tradertrader_id, -- Unique trader identifiertoken_bought_mint_address, -- Address of the bought tokentoken_sold_mint_address, -- Address of the sold tokenamount_usd -- Trade amount in USDFROM traders_tableGROUP BYtrader_id,token_bought_mint_address,token_sold_mint_address,amount_usd)SELECTay AS First_active_day, -- The initial trading dayCOUNT(DISTINCT trader_id) AS active_users, -- Total unique users trading for the first timeCOUNT(DISTINCT token_bought_mint_address) AS no_of_first_time_buy_txns, -- Unique buy transactionsCOUNT(DISTINCT token_sold_mint_address) AS no_of_first_time_sell_txns, -- Unique sell transactionsCOALESCE(SUM(amount_usd), 0) AS Daily_usd_volume, -- Total USD volume for the dayCOUNT(*) AS total_swaps_per_day, -- Total number of swaps executed per dayCOALESCE(AVG(amount_usd), 0) AS avg_trade_size -- Average size of trades in USDFROM First_time_traders_tableGROUP BYayORDER BYay