Created
August 10, 2011 13:55
-
-
Save betawax/1136849 to your computer and use it in GitHub Desktop.
Get the most used domains of email addresses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUBSTRING_INDEX(email, '@', -1) AS domain, COUNT(SUBSTRING_INDEX(email, '@', -1)) AS count FROM table GROUP BY domain ORDER BY count DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment