Query editor
-- part of a query repo-- query name: worldchain_new_wallets-- query link: https://dune.com/queries/4155156-- This query is ingested by the data engineering team. Please let us know of any modification.withsafe_txs as (selectblock_time,tx_hash,address as walletfrom safe_worldchain.transactions -- CHANGEwhere 1=1and block_time > date'2024-07-01'-- and address = 0x000c748bb0e5309c2bf6541ce2d44cab96488c1a -- REMOVE),all_txs as (selectblock_time,hash as tx_hash,"from" as wallet,'EOA' as typefrom worldchain.transactions -- CHANGEwhere block_time > date'2024-07-01'and hash not in (select tx_hash from safe_txs)union allselectblock_time,tx_hash,wallet,'SAFE' as typefrom safe_txs),min_date as (selectwallet,type,min(block_time) as first_timefrom all_txsgroup by 1,2),new_wallet_daily as (selectdate_trunc('day', first_time) as date,type,count(wallet) as type_new_walletsfrom min_dategroup by 1,2),cumu_data as (selectdate,type,type_new_wallets,sum(case when type = 'SAFE' then type_new_wallets end) over(order by date)/1e6 as safe_counter,sum(type_new_wallets) over(partition by date) as new_wallets,