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 |
|
bob_carter
Starting Member
3 Posts |
Posted - 2007-05-04 : 09:53:28
|
| Hi,I have one table in that i have two fields(Name,city)My question is using Count how to find total citie's name which are same and in the result i want to display like that,Result------Count City5 Usa6 caPlease somebody help me regarding my problemThanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-04 : 10:00:34
|
| [code]Select Count(Name) as [Count], CityFrom TableGroup by City[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
bob_carter
Starting Member
3 Posts |
Posted - 2007-05-04 : 10:11:03
|
| Thanks Harsh Athalye,Madhivanan. |
 |
|
|
|
|
|