Query editor
with user_summary as (select user_address,count(*) as Txns,max(block_time) as Last_xn,date_diff('day', min(block_time), now()) as Age_Days,count(distinct source_chain_id) as SC,count(distinct destination_chain_id) as DC,count(distinct transaction_contract) as Contracts,count(distinct date_trunc('day', block_time)) as Days,count(distinct date_trunc('week', block_time)) as Weeks,count(distinct date_trunc('month', block_time)) as Months,coalesce(sum(amount_usd), 0) as USDfrom layerzero.sendwhere user_address IN ('0x600a782c4d56961f8f72220d4c28b413b9cf3c87','0xd5733860d7d18fa6598ba2004316ec29d96ea81c')group by 1),user_summary_with_rank as (select *,(SC -- Count of used source chains+ if(DC >= 2, 1, 0) -- Conducted transactions to 2 destination chains+ if(DC >= 5, 1, 0) -- Conducted transactions to 5 destination chains+ if(DC >= 10, 1, 0) -- Conducted transactions to 10 destination chains+ if(Months >= 2, 1, 0) -- Conducted transactions during 2 distinct months+ if(Months >= 6 , 1, 0) -- Conducted transactions during 6 distinct months+ if(Months >= 9, 1, 0) -- Conducted transactions during 9 distinct months+ if(Months >= 12, 1, 0) -- Conducted transactions during 12 distinct months+ if(Weeks >= 10, 1, 0) -- Conducted transactions during 10 distinct weeks+ if(Weeks >= 20, 1, 0) -- Conducted transactions during 20 distinct weeks+ if(Weeks >= 50, 1, 0) -- Conducted transactions during 50 distinct weeks+ if(Weeks >= 100, 1, 0) -- Conducted transactions during 100 distinct weeks+ if(Days >= 50, 1, 0) -- Conducted transactions during 50 distinct days+ if(Days >= 100, 1, 0) -- Conducted transactions during 100 distinct days+ if(Days >= 200, 1, 0) -- Conducted transactions during 200 distinct days+ if(Days >= 500, 1, 0) -- Conducted transactions during 500 distinct days+ if(Age_Days >= 100, 1, 0) -- Started using Layer Zero before 100 days+ if(Age_Days >= 200, 1, 0) -- Started using Layer Zero before 200 days+ if(Age_Days >= 500, 1, 0) -- Started using Layer Zero before 500 days+ if(Txns >= 5, 1, 0) -- Conducted more than 5 transactions+ if(Txns >= 10, 1, 0) -- Conducted more than 10 transactions+ if(Txns >= 25, 1, 0) -- Conducted more than 25 transactions+ if(Txns >= 50, 1, 0) -- Conducted more than 50 transactions+ if(Txns >= 100, 1, 0) -- Conducted more than 100 transactions+ if(Contracts >= 5, 1, 0) -- Interacted more than 5 contracts on source chain+ if(Contracts >= 10, 1, 0) -- Interacted more than 10 contracts on source chain+ if(Contracts >= 25, 1, 0) -- Interacted more than 25 contracts on source chain+ if(Contracts >= 50, 1, 0) -- Interacted more than 50 contracts on source chain+ if(usd >= 1000, 1, 0) -- Total transaction amount exceeds $1000+ if(usd >= 10000, 1, 0) -- Total transaction amount exceeds $10000