Query editor
-- WSOLAddress: 'So11111111111111111111111111111111111111112'-- FeeWallet: 'EuQpXzpVYEydKhvBq77q2pUy3acrMpCbvnvT55n6FQAw'-- FirstTradeTimestamp: TIMESTAMP ''2025-05-21''WITHallFeePayments AS (SELECTtx_id,'SOL' AS feeTokenType,balance_change / 1e9 AS fee_token_amount,'So11111111111111111111111111111111111111112' AS fee_token_mint_address -- WSOLAddressFROMsolana.account_activityWHEREblock_time >= TIMESTAMP '2025-05-21' -- FirstTradeTimestampAND tx_successAND address IN ('Eno27Pu6ok2nNwLTgNCLnFmY2YxQsAXecmrnnLvJeFYh','3VZjDxp8grQbocYwEisZxSpvpw4XURL1CBwii5gkoAw6') -- FeeWalletsAND balance_change > 0 -- SOL fee payments),botTrades AS (SELECTblock_time,amount_usd,IF(token_sold_mint_address = 'So11111111111111111111111111111111111111112', -- WSOLAddress'Buy','Sell') AS type,token_bought_amount,token_bought_symbol,token_bought_mint_address AS token_bought_address,token_sold_amount,token_sold_symbol,token_sold_mint_address AS token_sold_address,fee_token_amount * price AS fee_usd,fee_token_amount,IF(feeTokenType = 'SOL', 'SOL', symbol) AS fee_token_symbol,fee_token_mint_address,project,version,token_pair,project_program_id AS project_contract_address,trader_id AS user,trades.tx_id,tx_index,outer_instruction_index,inner_instruction_indexFROMdex_solana.trades AS tradesJOIN allFeePayments AS feePayments ON trades.tx_id = feePayments.tx_idLEFT JOIN prices.usd AS feeTokenPrices ON (feeTokenPrices.blockchain = 'solana'AND fee_token_mint_address = toBase58 (feeTokenPrices.contract_address)AND date_trunc('minute', block_time) = minuteAND minute >= TIMESTAMP '2025-05-21' -- FirstTradeTimestamp)WHEREtrades.block_time >= TIMESTAMP '2025-05-21'-- FirstTradeTimestamp