How would you write complex joins, window functions, and query optimizations for large datasets for Uber?