The marketing analytics team wants to analyze which email providers customers use (gmail.com, yahoo.com, etc.). Extract the domain portion from customer email addresses.
Write a SQL query that extracts the domain (the part after @) from each customer's email address.
| Column | Type |
|---|---|
| CustomerId | INTEGER (Primary Key) |
| FirstName | TEXT |
| LastName | TEXT |
| Company | TEXT |
| Address | TEXT |
| City | TEXT |
| State | TEXT |
| Country | TEXT |
| PostalCode | TEXT |
| Phone | TEXT |
| Fax | TEXT |
| TEXT | |
| SupportRepId | INTEGER (Foreign Key → Employee.EmployeeId) |
STRPOS(string, substring) - Returns the position of substring in stringSUBSTR(string, start) - Returns substring starting at position startReady to take your skills to the next level? Enroll in our comprehensive Data Analyst Career Track to master SQL, Python, Excel, and Power BI.
Run your code to see the result here.