Count Email Address Domains
- by BRADINO
A quick tidbit I came up with today to count email addresses in a mysql database table grouping them by domain. So say for example you have a large list of subscribers and you want to see the breakdown of people who use Hotmail, Yahoo, Gmail, etc.
SELECT COUNT( SUBSTRING_INDEX( `email` , '@', -1 ) ) AS `count` ,
SUBSTRING_INDEX( `email` , '@',…