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 |
|
sulman
Starting Member
20 Posts |
Posted - 2007-02-20 : 10:03:44
|
| Hi,I have a table that has the following:col1--AAABCCI need to be able to count how many of each there are. i.e. I need a query that would return the following data:col1 count---- -----A 3B 1C 2Is this possible?Many thanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-02-20 : 10:05:16
|
| select col1, count(*) as countfrom table1group by col1order by col1Peter LarssonHelsingborg, Sweden |
 |
|
|
sulman
Starting Member
20 Posts |
Posted - 2007-02-20 : 10:19:43
|
| Excellent! works a treat.Thanks so much. |
 |
|
|
|
|
|