Write a SQL query to identify duplicate records in a customer database.
Treat customer records as duplicates when their non-empty email addresses match after trimming surrounding whitespace and ignoring letter case. Return every record belonging to a duplicate email group.
record_id, full_name, email, and duplicate_countrecord_id ascending| Column | Type | Description |
|---|---|---|
| record_idPK | INT | Unique customer record identifier |
| full_name | VARCHAR(100) | Customer's full name |
| VARCHAR(255) | Customer email address | |
| phone | VARCHAR(30) | Customer phone number |
| created_at | DATE | Date the customer record was created |