Write a SQL query to find the top three customers based on purchase frequency.
Assume purchase frequency means the number of completed purchases. Exclude cancelled or otherwise non-completed purchases, and use the customer ID as the tie-breaker.
customer_id, customer_name, and purchase_frequency.| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's display name |
| Column | Type | Description |
|---|---|---|
| purchase_idPK | INT | Unique purchase identifier |
| customer_id | INT | Customer associated with the purchase |
| purchase_status | VARCHAR(20) | Purchase processing status |