Query editor
WITH pump_tokens AS (SELECTtr.token_mint_address,MIN(block_time) AS token_launch_time,tx_signer AS token_creatorFROM tokens_solana.transfers trWHERE action = 'mint'AND outer_executing_account = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P'AND tr.token_mint_address IS NOT NULLAND block_time >= TIMESTAMP '{{minTimeText}}'GROUP BY tr.token_mint_address, tx_signer),token_supply AS (SELECTtoken_mint_address,SUM(amount / POWER(10, 6)) AS total_supplyFROM tokens_solana.transfersWHERE action = 'mint'GROUP BY token_mint_address),latest_usd_dex_prices AS (SELECT *FROM (SELECTROW_NUMBER() OVER (PARTITION BY token_bought_mint_address ORDER BY block_time DESC) AS swap_rank,token_bought_mint_address,token_bought_symbol AS symbol,amount_usd / token_bought_amount AS price_usd,projectFROM dex_solana.trades aINNER JOIN pump_tokens b ON a.token_bought_mint_address = b.token_mint_addressWHERE amount_usd IS NOT NULLAND token_bought_symbol IS NOT NULLAND token_bought_symbol != 'COOL💹'AND block_time >= TIMESTAMP '{{minTimeText}}')WHERE swap_rank = 1)SELECTROW_NUMBER() OVER (ORDER BY AVG(ts.total_supply * price_usd) DESC) AS creator_rank,pt.token_creator,AVG(ts.total_supply * price_usd) AS avg_fdv,APPROX_PERCENTILE(ts.total_supply * price_usd, 0.5) AS median_fdv,COUNT(DISTINCT pt.token_mint_address) AS tokens_created,ARRAY_AGG(pr.symbol) AS tokens,ARRAY_AGG(pt.token_mint_address) AS token_mint_addresses,MAX(pt.token_launch_time) AS latest_token_launch_timeFROM pump_tokens ptINNER JOIN latest_usd_dex_prices pr ON pt.token_mint_address = pr.token_bought_mint_addressINNER JOIN token_supply ts ON pt.token_mint_address = ts.token_mint_addressWHERE price_usd < 0.5AND project != 'pumpdotfun'AND pt.token_mint_address != '5rTp9dW8ZQL4AKRmGLHhPu7vb14ZXXX5Gb2qF1Vnpump'GROUP BY pt.token_creatorHAVING AVG(ts.total_supply * price_usd) >= {{min_fdv}}ORDER BY creator_rankLIMIT {{limit}};