How do I get a count of each set of results?

Giganews Newsgroups
Subject: How do I get a count of each set of results?
Posted by:  kasterbor…@yahoo.com
Date: 22 Aug 2006

My query returns a table of results, I would like to add a count column
that contains the number of each result type returned.

i.e.

Type    Count
1          3
1          3
1          3
2          2
2          2
3          4
3          4
3          4
3          4
4          2
4          2

Because there are 3 of type 1, 2 of type 2, 4 of type 3 etc...

Is there straightforward way of doing this in SQL?

Thanks

Replies