Query editor
WITH factory AS (SELECT address token,MIN(block_time) created_atFROM robinhood.creation_tracesWHERE block_month>=DATE '2026-07-01'AND "from"=0xd9ec2db5f3d1b236843925949fe5bd8a3836fccbGROUP BY 1),chosen AS (SELECT d.token_bought_address token,MIN(d.block_time) entry_timeFROM dex.trades dWHERE d.blockchain='robinhood' AND d.block_month>=DATE '2026-07-01'AND d.tx_from=0xa05058e70ffd78bf96d210760c672bc6d2b39185AND d.token_sold_address=0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73GROUP BY 1),decision AS (SELECT f.token,f.created_at,c.entry_time,c.entry_time IS NOT NULL chosen,COALESCE(c.entry_time,f.created_at+INTERVAL '5' MINUTE) decision_timeFROM factory f LEFT JOIN chosen c ON c.token=f.token),buy AS (SELECT q.token,q.chosen,q.created_at,q.entry_time,q.decision_time,COUNT(DISTINCT d.tx_hash) buy_txs,COUNT(DISTINCT d.tx_from) buyers,SUM(d.token_sold_amount) buy_eth,COUNT(DISTINCT IF(d.block_time>=q.decision_time-INTERVAL '30' SECOND,d.tx_hash,NULL)) buys_last_30s,COUNT(DISTINCT IF(d.block_time>=q.decision_time-INTERVAL '60' SECOND,d.tx_hash,NULL)) buys_last_60s,COUNT(DISTINCT IF(d.block_time>=q.decision_time-INTERVAL '30' SECOND,d.tx_from,NULL)) buyers_last_30s,SUM(IF(d.block_time>=q.decision_time-INTERVAL '30' SECOND,d.token_sold_amount,0e0)) buy_eth_last_30s,SUM(IF(d.block_time>=q.decision_time-INTERVAL '60' SECOND,d.token_sold_amount,0e0)) buy_eth_last_60s,MAX_BY(d.token_sold_amount/NULLIF(d.token_bought_amount,0e0),d.block_time) last_buy_price_ethFROM decision q LEFT JOIN dex.trades d ON d.token_bought_address=q.tokenAND d.blockchain='robinhood' AND d.block_month>=DATE '2026-07-01'AND d.token_sold_address=0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73AND d.block_time BETWEEN q.created_at AND q.decision_timeGROUP BY 1,2,3,4,5),sell AS (SELECT q.token,COUNT(DISTINCT d.tx_hash) sell_txs,COUNT(DISTINCT d.tx_from) sellers,SUM(d.token_bought_amount) sell_ethFROM decision q LEFT JOIN dex.trades d ON d.token_sold_address=q.tokenAND d.blockchain='robinhood' AND d.block_month>=DATE '2026-07-01'AND d.token_bought_address=0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73AND d.block_time BETWEEN q.created_at AND q.decision_timeGROUP BY 1),f AS (SELECT b.*,COALESCE(s.sell_txs,0) sell_txs,COALESCE(s.sellers,0) sellers,COALESCE(s.sell_eth,0e0) sell_eth,DATE_DIFF('second',b.created_at,b.decision_time) age_seconds,COALESCE(b.buy_eth,0e0)-COALESCE(s.sell_eth,0e0) net_buy_eth,(COALESCE(b.buyers,0)>=9 AND COALESCE(b.buy_eth,0e0)>=0.2AND COALESCE(b.buys_last_30s,0)>=2) simple_signalFROM buy b LEFT JOIN sell s ON s.token=b.token),thresholds(name,min_buyers,min_buy_eth,min_buys_30s,min_eth_30s) AS (VALUES('loose',9e0,0.2e0,2e0,0e0),('p10_like',15e0,0.5e0,5e0,0.1e0),