Welcome to the SQL screen.
The question is on your right: Monthly Trip Growth by Market. Read through the requirements and the three tables first.
Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?
RideNow wants to understand market growth by city. Write a SQL query that joins trips, users, and cities to calculate monthly growth by market for completed trips in 2024.
city_name, then month.| Column | Type | Description |
|---|---|---|
| trip_idPK | INT | Unique trip identifier |
| user_id | INT | Rider who took the trip |
| city_id | INT | City where the trip occurred |
| trip_date | DATE | Date of the trip |
| status | VARCHAR(20) | Trip status such as completed or cancelled |
| fare_amount | DECIMAL(10,2) | Fare amount charged for the trip |
| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| user_name | VARCHAR(100) | Rider name |
| signup_city_id | INT | City where the rider signed up |
| signup_date | DATE | Date the rider signed up |
| Column | Type | Description |
|---|---|---|
| city_idPK | INT | Unique city identifier |
| city_name | VARCHAR(100) | Market name |
| region | VARCHAR(50) | Region grouping for the city |