Combine multiple advanced techniques (window functions, subqueries, CASE WHEN, multi-table joins, NULL handling) in a single analytical query