Query editor
-- query_8439237: first/second-second reference high, ATH, 1.2x filter-- Reads only from query_8434382 — no direct query_8432744 referenceWITH price_summary AS (SELECTtoken_mint,MAX(dev_wallet) AS dev_wallet,MAX(dev_mint_count_90d) AS dev_mint_count_90d,MAX(volume_usd) AS volume_usd,MAX(mint_time) AS mint_time,MAX(CASE WHEN DATE_DIFF('second', mint_time, block_time) = 0 THEN price_usd END) AS high_s1,MAX(CASE WHEN DATE_DIFF('second', mint_time, block_time) = 1 THEN price_usd END) AS high_s2,MAX(price_usd) AS ath_price_usdFROM query_8434382GROUP BY token_mint),reference_high AS (SELECTtoken_mint,dev_wallet,dev_mint_count_90d,volume_usd,mint_time,COALESCE(high_s1, high_s2) AS ref_high_price_usd,CASE WHEN high_s1 IS NOT NULL THEN 'sec_1' ELSE 'sec_2' END AS ref_source,ath_price_usdFROM price_summary)SELECTtoken_mint,dev_wallet,dev_mint_count_90d,mint_time,ref_source,ref_high_price_usd,volume_usd,ath_price_usd,ath_price_usd / ref_high_price_usd AS x_multipleFROM reference_highWHERE ref_high_price_usd IS NOT NULLAND ath_price_usd >= ref_high_price_usd * 1.2ORDER BY x_multiple DESC