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_arbitrum.evt_TransferWHEREcontract_address = 0x6c84a8f1c29108f47a79964b5fe888d4f4d0de40GROUP 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 = 0x6c84a8f1c29108f47a79964b5fe888d4f4d0de40AND blockchain = 'arbitrum'AND minute > NOW() - INTERVAL '180' 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 '180' dayORDER BYa.day DESC