Your question is Top Clinics by Patient Volume. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Oracle Health EHR operations leaders need a ranked view of clinic utilization. Write a PostgreSQL query to identify the five clinics with the highest patient volume during calendar year 2025.
clinics to visits and consider only visits with visit_status = 'completed' from 2025.clinic_id.clinic_name, city, patient_volume, and clinic_rank, ordered by rank.| Column | Type | Description |
|---|---|---|
| clinic_idPK | INTEGER | Unique clinic identifier |
| clinic_name | VARCHAR(100) | Oracle Health EHR clinic name |
| city | VARCHAR(80) | Clinic city |
| Column | Type | Description |
|---|---|---|
| visit_idPK | INTEGER | Unique visit identifier |
| clinic_id | INTEGER | Associated clinic identifier |
| patient_id | INTEGER | Patient identifier |
| visit_date | DATE | Date of the visit |
| visit_status | VARCHAR(20) | Visit completion status |