this is a query that get you a list of the servers of the users emails that they registered with, for example if you have 100 people that has a hotmail account and 200 users with gmail you will get this table:
count server
-----------------
100 hotmail
200 gmail
...
here is the query:
select * from
(SELECT Count(users.UserID) AS Count, right(users.Useremail,len(users.Useremail)-instr(users.Useremail,'@')) as server
FROM users
where users.useremail <> ''
GROUP BY right(users.Useremail,len(users.Useremail)-instr(users.Useremail,'@')))
order by count
Showing posts with label db. Show all posts
Showing posts with label db. Show all posts
Wednesday, July 04, 2007
sql query for getting your users email servers
Posted by
RamiX
at
9:16 AM
0
comments
Labels: database, db, queries, source codes, sql, sql server, sql server 2000, sql server 2005 express
Subscribe to:
Posts (Atom)
