Query editor
-- WSOLAddress: 'So11111111111111111111111111111111111111112'-- BuyFeeWallet: HEPL5rTb6n1Ax6jt9z2XMPFJcDe9bSWvWQpsK7AMcbZg-- SellFeeWallet: K1LRSA1DSoKBtC5DkcvnermRQ62YxogWSCZZPWQrdG5-- FirstTradeTimestamp: TIMESTAMP '2023-11-10'SELECT*,fee_token_address AS fee_token_mint_address,is_last_trade_in_transaction AS isLastTradeInTransactionFROMsol_trading_bot_solana.bot_trades/*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 '2023-11-10' -- FirstTradeTimestampAND tx_successAND address IN ('HEPL5rTb6n1Ax6jt9z2XMPFJcDe9bSWvWQpsK7AMcbZg', -- BuyFeeWallet'K1LRSA1DSoKBtC5DkcvnermRQ62YxogWSCZZPWQrdG5' -- SellFeeWallet)AND 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 (