01-11-2008, 08:10 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Posts: 41
Thanks: 24
|
Need help with a query
Right now, I am using this query to grab all the email domain names from all my users:
SELECT DISTINCT REVERSE(LEFT(REVERSE(email),LOCATE('@',REVERSE(ema il)) - 1)) AS domain FROM users ORDER BY domain
Is there a way to alter this query where it will return 2 columns of data, 1 with the results from above and 1 with count of users with the domain?
Thanks in advance
__________________
"Things you can get access to, you should never memorize." -Albert Einstein
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
|
|
|
|