Query editor
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 (select-- date_trunc('day', first_time) as date,type,count(wallet) as wallet_typefrom min_dategroup by 1-- ),-- cumu_data as (-- select-- date,-- type,-- type_new_wallets,-- sum(case when type = 'SAFE' then type_new_wallets end) over(order by date)/1e3 as safe_counter,-- sum(type_new_wallets) over(partition by date) as new_wallets,-- sum(type_new_wallets) over(partition by type order by date) as type_total_wallets,-- sum(type_new_wallets) over(order by date)/1e3 as total_wallets_counter-- from new_wallet_daily-- )-- select * from cumu_data-- where date >= date_add('day', -90, current_date)