Query editor
WITH whale_buys AS (SELECTtaker AS wallet,SUM(amount_usd) AS total_spend_usd,SUM(token_bought_amount) AS total_tokens_boughtFROM dex.tradesWHERE token_bought_symbol = 'PEPE'AND blockchain = 'ethereum'AND block_time >= TIMESTAMP '2024-01-01'GROUP BY takerHAVING SUM(amount_usd) > 50000)SELECTwallet,total_spend_usd,total_tokens_bought,(total_spend_usd / NULLIF(total_tokens_bought, 0)) AS avg_entry_price_usdFROM whale_buysORDER BY total_spend_usd DESCLIMIT 20