Query editor
-- Query to return RouteProcessor 9 and 9.1 data for SushiSwap trades using events with referrer = 2SELECTblockchain,project,version,block_month,block_date,block_time,trade_type,token_bought_symbol,token_sold_symbol,token_pair,token_bought_amount,token_sold_amount,token_bought_amount_raw,token_sold_amount_raw,amount_usd,token_bought_address,token_sold_address,taker,maker,project_contract_address,tx_hash,tx_from,tx_to,trace_address,evt_indexFROM (-- RouteProcessor 9 and 9.1 specific trades from eventsWITH rp_events AS (-- Route events for RP 9SELECT'9' as version,evt_block_time as block_time,evt_block_number,evt_tx_hash as tx_hash,evt_index,ARRAY[evt_index] as trace_address,evt_tx_from as tx_from,evt_tx_to as tx_to,'routeprocessor9_evt_Route' as event_name,tokenIn as token_sold_address,tokenOut as token_bought_address,amountIn as token_sold_amount_raw,amountOut as token_bought_amount_raw,evt_tx_to as project_contract_address,chain as blockchainFROM sushiswap_multichain.routeprocessor9_evt_RouteWHERE referralCode = 2AND evt_block_time >= TIMESTAMP '2025-09-01'UNION ALL-- Route events for RP 9.1SELECT'9.1' as version,evt_block_time as block_time,evt_block_number,evt_tx_hash as tx_hash,