MS Access has two functions, in particular, that help. You should basically do this:
- Extract the part of the domain that appears after the "@" char. (Help Mid and InStr help with this.)
- Use this with a counter.
In MS Access you can do this:
Mid([Email],InStr([Email],"@")+1) , which will give you domain names.
To calculate these usage values as usual.
Contact: http://www.techonthenet.com/access/functions/string/mid.php
Now, if you need an SQL server for MSSQL:
select SUBSTRING(email,(CHARINDEX('@',email)+1),1), count(*) from ...(rest of your query)
source share