Query editor
WITHPepeTransfers AS (SELECTerc20_base.evt_transfer.to AS recipient,evt_block_time,nonceFROMerc20_base.evt_transferLEFT JOIN base.transactions ON erc20_base.evt_transfer.evt_tx_hash = base.transactions.hashWHEREcontract_address = 0x698DC45e4F10966f6D1D98e3bFd7071d8144C233AND nonce < 5AND evt_block_time >= CAST('2024-02-24 00:00:00.000 UTC' AS TIMESTAMP)),firstPepeInflow AS (SELECTrecipient,MIN(evt_block_time) AS firstPepeInflow,MIN(nonce) AS nonceFROMPepeTransfersGROUP BYrecipient),ethTransfers AS (SELECTto AS recipient,block_timeFROMbase.tracesWHEREvalue > 0AND to IN (SELECTrecipientFROMfirstPepeInflow)),firstEthInflow AS (SELECTrecipient,MIN(block_time) AS firstEthInflowFROMethTransfersGROUP BYrecipient)SELECTfirstPepeInflow.*,firstEthInflow,date_diff('minute', firstEthInflow, firstPepeInflow) AS timeDifferenceInMinutesFROMfirstPepeInflowJOIN firstEthInflow ON (firstPepeInflow.recipient = firstEthInflow.recipientAND firstEthInflow >= firstPepeInflow - interval '24' hour)WHEREdate_diff('minute', firstEthInflow, firstPepeInflow) > 0