Query editor
with backup_address as(select * from(select"from" as from_address,max(CAST(nonce AS double)) as max_nonce,min(block_date) as min_date,max(block_date) as max_date,count(DISTINCT block_date) as day_cnt,sum(l1_gas_used * gas_price) as gas_usefrom unichain.transactionsgroup by "from")where (max_date != min_date)and max_nonce >= 5),min_block as (select"from" as from_address,min(block_number) as block_numberfrom unichain.transactionswhere "from"!="to"group by "from"),min_action as (SELECTfrom_address,first_to_address,first_methoidFROM(SELECT*,row_number() over(PARTITION BY from_address ORDER BY transaction_index) as rank1FROM(SELECTa.from_address,a.to_address as first_to_address,a.methoid as first_methoid,a.transaction_indexFROM(select"from" as from_address,block_number,"to" as to_address,substr(data,1,10) as methoid,index as transaction_indexfrom unichain.transactions)a inner join min_block b on a.from_address=b.from_addressand a.block_number=b.block_number))where rank1=1),max_block as (select"from" as from_address,max(block_number) as block_numberfrom unichain.transactions