Query editor
withwallets as (selectcall_block_time,output_0fromdefidotapp_arbitrum.KernelFactory_call_createAccountunion allselectcall_block_time,output_0fromdefidotapp_base.KernelFactory_call_createAccountunion allselectcall_block_time,output_0fromdefidotapp_bnb.KernelFactory_call_createAccountunion allselectcall_block_time,output_0fromdefidotapp_ethereum.KernelFactory_call_createAccount),agg as (selectRANK() OVER (partition byoutput_0ORDER BYcall_block_time ASC) AS rank,call_block_time,output_0fromwallets),users as (select-- date_trunc('day',call_block_time) as date-- ,count(*) as countcall_block_time,output_0 as addressfromaggwhererank = 1--group by 1),inflow as (select-- u.address-- ,t.symbol-- ,t.amountt.block_date,sum(t.amount_usd) inflowfromusers u