Query editor
with all_logs as(select 'ethereum' as chain, contract_address, block_time, topic0, topic1, topic2, topic3, data, tx_hashfrom ethereum.logswhere block_number >= 18457118union allselect 'polygon' as chain, contract_address, block_time, topic0, topic1, topic2, topic3, data, tx_hashfrom polygon.logswhere block_number >= 45145069UNION ALLselect 'optimism' as chain, contract_address, block_time, topic0, topic1, topic2, topic3, data, tx_hashfrom optimism.logswhere block_number >= 107603860UNION ALLselect 'base' as chain, contract_address, block_time, topic0, topic1, topic2, topic3, data, tx_hashfrom base.logswhere block_number >= 1898666UNION ALLselect 'arbitrum' as chain, contract_address, block_time, topic0, topic1, topic2, topic3, data, tx_hashfrom arbitrum.logswhere block_number >= 123416397),-- withaccount_deployments_by_chain_agg as(selectdate_trunc('hour', block_time) block_date,count(1) accounts_deployed,count(case when chain = 'ethereum' then 1 end) accounts_deployed_ethereum,count(case when chain = 'polygon' then 1 end) accounts_deployed_polygon,count(case when chain = 'optimism' then 1 end) accounts_deployed_optimism,count(case when chain = 'base' then 1 end) accounts_deployed_base,count(case when chain = 'arbitrum' then 1 end) accounts_deployed_arbitrum-- ,count(distinct new_owner) unique_new_ownersfrom all_logswhere 1=1and topic0 = 0xd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d --AccountDeployedand contract_address = 0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789and substr(data,13,20) = 0xaee9762ce625e0a8f7b184670fb57c37bfe1d0f1group by 1 order by 1 desc )select *,sum(accounts_deployed_ethereum) over (order by block_date) cumulative_accounts_deployed_ethereum,sum(accounts_deployed_polygon) over (order by block_date) cumulative_accounts_deployed_polygon,sum(accounts_deployed_optimism) over (order by block_date) cumulative_accounts_deployed_optimism,sum(accounts_deployed_base) over (order by block_date) cumulative_accounts_deployed_base,sum(accounts_deployed_arbitrum) over (order by block_date) cumulative_accounts_deployed_arbitrum,sum(accounts_deployed) over (order by block_date) cumulative_accounts_deployedfrom account_deployments_by_chain_aggorder by block_date desc