View Single Post
Old 01-11-2008, 08:10 PM   #1 (permalink)
webosb
The Contributor
 
webosb's Avatar
 
Join Date: Nov 2007
Posts: 41
Thanks: 24
webosb is on a distinguished road
Default 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
webosb is offline  
Reply With Quote