Write a SQL query using an inner join to find all patients who have had more than three appointments in the last month.
Treat "last month" as the rolling period from one month before the current date through the current date.
patient_id, patient_name, and appointment_count.appointment_count descending, then patient_id ascending.| Column | Type | Description |
|---|---|---|
| patient_idPK | INT | Unique patient identifier |
| patient_name | VARCHAR(100) | Patient's full name |
| Column | Type | Description |
|---|---|---|
| appointment_idPK | INT | Unique appointment identifier |
| patient_id | INT | Patient associated with the appointment |
| appointment_date | DATE | Date of the appointment |
| status | VARCHAR(20) | Appointment status |