ABC Education uses its customer operations data to identify customers with unusually high return activity. Write a PostgreSQL query that returns customers whose percentage of delivered orders with an approved or refunded return exceeds 50%.
order_status = 'delivered'.| Column | Type | Description |
|---|---|---|
| customer_idPK | INTEGER | Unique customer identifier |
| customer_name | VARCHAR(100) | Customer's full name |
| VARCHAR(255) | Customer email address | |
| region | VARCHAR(50) | ABC Education operating region |
| Column | Type | Description |
|---|---|---|
| order_idPK | INTEGER | Unique order identifier |
| customer_id | INTEGER | Customer who placed the order |
| order_status | VARCHAR(20) | Order lifecycle status |
| Column | Type | Description |
|---|---|---|
| return_idPK | INTEGER | Unique return record identifier |
| order_id | INTEGER | Order associated with the return |
| return_status | VARCHAR(20) | Return processing status |