Write a query to find the top three most frequent email senders for each customer domain, using window functions.
Use the provided customer domain and email message data. Exclude messages without a sender and return only domains with at least one valid sender.
domain_name, sender_email, message_count, and sender_rank.| Column | Type | Description |
|---|---|---|
| domain_idPK | INT | Unique customer domain identifier |
| domain_name | VARCHAR(255) | Customer email domain |
| Column | Type | Description |
|---|---|---|
| message_idPK | INT | Unique email message identifier |
| customer_domain_id | INT | Customer domain associated with the message |
| sender_email | VARCHAR(255) | Email address that sent the message |