Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2005-04-10 : 06:07:17
|
| I have an sql select * from users order by namenow how could I make an sql to count all of the entires -- like for example how many of the same names and if the same name is in the table more then 10 times to tell me the name and amount of times.so if "tom" is in the table more than 10 times it will show me tom and amount of times and the same for all the names.Can anyone help me with this? |
|
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2005-04-10 : 07:24:54
|
| [code]select name,count(*) from usersgroup by namehaving count(*) > 10order by name[/code] |
 |
|
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2005-04-10 : 07:45:56
|
| thanks! :) |
 |
|
|
|
|
|