with tm as( select tenant_id,module_name,sum(call_count) total_calls from usage_logs group by tenant_id,module_name ), tt as( select tenant_id,module_name,total_calls,sum(total_calls)over(partition by tenant_id) tc,row_number()over(partition by tenant_id order by total_calls desc) p from tm ) select...