Query editor
-- This query has been migrated to run on DuneSQL.-- If you need to change back because you’re seeing issues, use the Query History view to restore the previous version.-- If you notice a regression, please email [email protected].WITHnew_transfers AS (SELECTto AS wallet,MIN(evt_block_time) AS timeFROMerc20_ethereum.evt_TransferWHEREcontract_address = 0xADE00C28244d5CE17D72E40330B1c318cD12B7c3GROUP BY1),new_wallets AS (SELECTCOUNT(*) AS new_wallets,DATE_TRUNC('day', time) AS dayFROMnew_transfersGROUP BY2),prices AS (SELECTAVG(price) AS price,DATE_TRUNC('day', minute) AS dayFROMprices.usdWHEREcontract_address = 0xADE00C28244d5CE17D72E40330B1c318cD12B7c3AND blockchain = 'ethereum'AND minute > NOW() - INTERVAL '30' dayGROUP BY2)SELECTa.new_wallets AS new_wallets_created,SUM(a.new_wallets) OVER (ORDER BYa.day NULLS FIRST) AS cum_new_wallets,a.day AS day,b.price AS token_priceFROMnew_wallets AS aLEFT JOIN prices AS b ON a.day = b.dayWHEREa.day > NOW() - INTERVAL '30' dayORDER BYa.day DESC