LinkedIn's marketing team might run a query to understand which email services are being used by which customers. If 60% of their customers use Gmail, for instance, that will likely influence how they think about deliverability and outreach strategy. Using the customers table, return domain (the part of the email after @) and customer_count, ordered by customer_count descending.
customers
| column | type |
|---|---|
| id | INTEGER |
| name | TEXT |
| TEXT | |
| created_at | DATE |
| id | name | created_at | |
|---|---|---|---|
| 1 | Alice | alice@gmail.com | 2024-01-01 |
| 2 | Bob | bob@yahoo.com | 2024-01-02 |
| 3 | Carol | carol@gmail.com | 2024-01-03 |
| 4 | Dave | dave@outlook.com | 2024-01-04 |
| 5 | Eve | eve@gmail.com | 2024-01-05 |
| domain | customer_count |
|---|---|
| gmail.com | 3 |
| outlook.com | 1 |
| yahoo.com | 1 |
Three customers use gmail.com, making it the most popular domain. outlook.com and yahoo.com each have one customer.