Only showing after @ duplicates

S

sanderijken

I have a column with e-mail adressess in it. I want a duplicate query showing
only the duplicates what comes after the @ sign.

Example:

(e-mail address removed)
(e-mail address removed)
(e-mail address removed)

Result I want
@hotmail.com 2
@gmail.com 1
 
G

Guest

Replace the [x] with the name of your field.
SELECT Right([x],Len([x])-InStr([x],"@")+1) AS Expr1, Count(a.x) AS CountOfx
FROM [YourTable]
GROUP BY Right([x],Len([x])-InStr([x],"@")+1);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top