How many active restaurants are in each city?
Asked in the BPS1 - SQL stage. This is a known question involving restaurant tables.
Write a SQL query using the provided tables.
city_name and active_restaurant_count.city_name.| Column | Type | Description |
|---|---|---|
| city_idPK | INT | Unique city identifier |
| city_name | VARCHAR(100) | City name |
| Column | Type | Description |
|---|---|---|
| restaurant_idPK | INT | Unique restaurant identifier |
| restaurant_name | VARCHAR(150) | Restaurant name |
| city_id | INT | City where the restaurant operates |
| is_active | BOOLEAN | Whether the restaurant is currently active |