Interview Guides
You are given Lyft earnings data at the ride level. Write a PostgreSQL query that returns each driver's total earnings for each week and ranks drivers within their city for that week based on total weekly earnings. Use a window function so that drivers with the same weekly earnings receive the same rank.