Query editor
-- Step 2: same-slot sandwich rate on Axiom swaps, split by landing service.-- Labels (tip accounts, Axiom fee wallets) come from query 9228999.-- Window is one hour to keep the first runs cheap; widen the three time filters together.WITH labels AS (SELECT address, service, kind FROM query_9228999),chk AS (SELECT lower(to_hex(md5(to_utf8(array_join(array_agg(address ORDER BY address), ','))))) AS tip_table_md5FROM labels WHERE kind = 'tip'),axiom_tx AS (SELECT DISTINCT a.tx_idFROM solana.account_activity aWHERE a.address IN (SELECT address FROM labels WHERE kind = 'axiom_fee')AND a.block_time >= TIMESTAMP '2026-11-30 15:00:00'AND a.block_time < TIMESTAMP '2026-11-30 16:00:00'AND a.tx_successAND a.balance_change > 0),tip_tx AS (SELECT a.tx_id, l.serviceFROM solana.account_activity aJOIN labels l ON l.address = a.address AND l.kind IN ('tip', 'tip_unattributed')WHERE a.address IN (SELECT address FROM labels WHERE kind IN ('tip', 'tip_unattributed'))AND a.block_time >= TIMESTAMP '2026-11-30 15:00:00'AND a.block_time < TIMESTAMP '2026-11-30 16:00:00'AND a.tx_successAND a.balance_change > 0AND a.tx_id IN (SELECT tx_id FROM axiom_tx)),sender AS (SELECT x.tx_id,CASE WHEN count(t.service) = 0 THEN 'No known tip'ELSE array_join(array_sort(array_agg(DISTINCT t.service)), ' + ') END AS senderFROM axiom_tx xLEFT JOIN tip_tx t ON t.tx_id = x.tx_idGROUP BY 1),trades AS (SELECT tx_id, block_slot, tx_index, trader_id,token_bought_mint_address AS bm,token_sold_mint_address AS sm,token_bought_amount AS ba,token_sold_amount AS sa,amount_usd,coalesce(least(token_bought_vault, token_sold_vault), project_program_id, project) AS poolFROM dex_solana.tradesWHERE block_month = DATE '2026-11-01'AND block_time >= TIMESTAMP '2026-11-30 15:00:00'AND block_time < TIMESTAMP '2026-11-30 16:00:00'),victims AS (SELECT t.*, s.senderFROM trades tJOIN sender s ON s.tx_id = t.tx_id),pairs AS (-- front leg: same pool and direction, earlier in the slot, different trader-- back leg: opposite direction, later in the slot, same trader as the front legSELECT v.tx_id,