SQL · Waymo · Easy
You have two tables that store information about a ride-sharing service: Table: rides Table: users user_id is the primary key of users, and ride_id is the primary key of rides. For every city, count the number of distinct users who have taken 0 or 1 total rides ever. A user who has never taken a ride must be included. Return two columns: city and low_freq_user_count. Sort the result by city in ascending order. Example Input: Output: Explanation: User 1 has taken zero rides,…
Checking your access…