SQLTeam.com | Weblogs | Forums

Group By Clause


#1

Hi
I have a table in which I have different values. For example
1
1
1
2
2
Here 1 represents good and 2 represent bad. When I run the query
select count(r1) as count From feedback_lecture group by r1
It shows me the result as follows:
3
2
How can I come to know that which is 1's group and which is 2's group. Any help in this regard. Thanks


#2

hi

please try

select r1,count(r1)
from table
group by r1

hope it helps
:slight_smile:
:slight_smile: