Query editor
withuser_detail as(selectuser_address,count(*) as Interected_count,min(block_time) as initial_block_time,max(block_time) as last_block_time,date_diff('day', min(block_time), now()) as L0_total_days,count(distinct source_chain_id) as active_source_chain_count,count(distinct destination_chain_id) as active_destination_chain_count,count(distinct transaction_contract) as active_transaction_contract_count,count(distinct date_trunc('day', block_time)) as active_days_count,count(distinct date_trunc('week', block_time)) as active_weeks_count,count(distinct date_trunc('month', block_time)) as active_months_count,coalesce(sum(amount_usd), 0) as Interected_USDfrom layerzero.sendgroup by 1)select*,ROW_NUMBER() OVER (ORDER BY Interected_count DESC) AS Interected_count_rank,ROW_NUMBER() OVER (ORDER BY L0_total_days DESC) AS L0_total_days_rank,ROW_NUMBER() OVER (ORDER BY active_source_chain_count DESC) AS Active_source_chain_count_rank,ROW_NUMBER() OVER (ORDER BY active_destination_chain_count DESC) AS Active_destination_chain_count_rank,ROW_NUMBER() OVER (ORDER BY active_days_count DESC) AS Active_days_count_rank,ROW_NUMBER() OVER (ORDER BY Interected_USD DESC) AS Interected_USD_rank,COUNT(*) OVER () AS Total_countfrom user_detail