Write a SQL query to retrieve the top 10 patients by visit frequency.
Use the patients and visits tables. Count recorded visits for each patient and exclude patients with no visits.
patient_id, patient_name, and visit_count.visit_count descending, then patient_id ascending to break ties.| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| patient_name | VARCHAR(100) | Patient's full 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(40) | Type of clinical visit |