Query editor
WITH first_transactions AS (-- Find the very first transaction time for every wallet on BaseSELECT"from" as user_address,MIN(block_time) as first_tx_timeFROM base.transactionsGROUP BY 1),elsa_buys AS (-- Filter for ELSA buys specificallySELECTtx_from,amount_usd,block_timeFROM dex.tradesWHERE blockchain = 'base'AND token_bought_address = 0x4B974e866746958FDc9471cC59bDb980a196b420)SELECTeb.tx_from as new_user,eb.amount_usd as buy_amount,eb.block_time as trade_time,-- HTML Links'<a href="https://debank.com/profile/' || cast(eb.tx_from as varchar) || '" target="_blank">🍎 DeBank</a>' as debank,'<a href="https://app.zerion.io/address/' || cast(eb.tx_from as varchar) || '/overview" target="_blank">🛡️ Zerion</a>' as zerionFROM elsa_buys ebJOIN first_transactions ft ON ft.user_address = eb.tx_from-- Only show users whose FIRST transaction on Base was within 24 hours of their ELSA buyWHERE ft.first_tx_time >= (eb.block_time - interval '24' hour)ORDER BY eb.amount_usd DESCLIMIT 50