Skip to content

Commit 596be6a

Browse files
committed
finish Find All Unique Email Domains
1 parent cfb9d06 commit 596be6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SELECT DISTINCT SUBSTRING(email from POSITION('@' in email) + 1) as email_domain, COUNT(*)
2+
FROM Emails
3+
WHERE RIGHT(email, 4) = '.com'
4+
GROUP BY email_domain
5+
ORDER BY email_domain, COUNT(*) desc

0 commit comments

Comments
 (0)