SQL · Waymo · Medium
We have two tables that record ride-hailing activity: Table: rides Table: users user_id is the primary key of users. ride_id is the primary key of rides. For every user, we define their active month N as the Nth distinct calendar month (ignoring months with zero rides) in which they took at least one trip. The task is to calculate the average ride rating over all rides taken during users’ 1st active month and their 3rd active month, broken down by city. A user who never…
Checking your access…