Write a SQL query to find the top 10 patients by appointment frequency at PatientPoint.
Count only completed and scheduled appointments. Exclude cancelled and no-show appointments, as well as appointments without a matching patient record.
patient_id, full_name, and appointment_count.appointment_count descending and patient_id ascending to break ties.| Column | Type | Description |
|---|---|---|
| patient_idPK | INTEGER | Unique patient identifier |
| full_name | VARCHAR(200) | Patient's full name |
| date_of_birth | DATE | Patient date of birth |
| Column | Type | Description |
|---|---|---|
| appointment_idPK | INTEGER | Unique appointment identifier |
| patient_id | INTEGER | Patient associated with the appointment |
| appointment_date | DATE | Date of the appointment |
| status | VARCHAR(20) | Appointment status |