Created
April 20, 2017 07:14
-
-
Save MajidSafari/9082f76bce08c72a3b3888c09beb2e0d to your computer and use it in GitHub Desktop.
Mail Check Domain
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 RIGHT(Email, LEN(Email) - CHARINDEX('@', email)) Domain , | |
COUNT(Email) EmailCount | |
FROM Article.tblNewsLetter | |
WHERE LEN(Email) > 0 AND MailCheck=1 AND IsActive=1 | |
GROUP BY RIGHT(Email, LEN(Email) - CHARINDEX('@', email)) | |
ORDER BY EmailCount DESC | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment