Can you write a SQL query to find the top 10 patients by visit frequency at Oak Street Health?
Use the patients and visits tables. Include patients with no recorded visits when necessary to produce a complete patient ranking.
patient_id, first_name, last_name, and visit_count.visit_count descending and patient_id ascending for ties.| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| first_name | VARCHAR(50) | Patient first name |
| last_name | VARCHAR(50) | Patient last name |
| date_of_birth | DATE | Patient date of birth |
| Column | Type | Description |
|---|---|---|
| visit_idPK | INT | Unique visit identifier |
| patient_id | INT | Patient associated with the visit |
| visit_date | DATE | Date of the visit |
| visit_type | VARCHAR(30) | Type of clinical visit |