Number of forum users with a given domain in their email address. mysql> SELECT SUBSTR(email, INSTR(email, '@')+1) AS domain, COUNT(*) as count FROM user GROUP BY domain ORDER BY count DESC LIMIT 30; +------------------+-------+ | domain | count | +------------------+-------+ | hotmail.com | 7322 | | yahoo.com | 3087 | | gmail.com | 1660 | | aol.com | 658 | | msn.com | 614 | | gmx.de | 402 | | web.de | 372 | | comcast.net | 352 | | yahoo.co.uk | 352 | | gmx.net | 239 | | yahoo.fr | 218 | | ntlworld.com | 212 | | wanadoo.fr | 201 | | sbcglobal.net | 184 | | free.fr | 182 | | yahoo.com.br | 153 | | blueyonder.co.uk | 141 | | yahoo.de | 133 | | btinternet.com | 129 | | libero.it | 117 | | yahoo.ca | 107 | | earthlink.net | 101 | | cox.net | 100 | | hotmail.co.uk | 92 | | tiscali.co.uk | 90 | | t-online.de | 84 | | freenet.de | 82 | | netscape.net | 79 | | hotmail.fr | 77 | | sympatico.ca | 75 | +------------------+-------+ 30 rows in set (0.25 sec)