i have table students with fields classname,studname
select * from students
classname studname
1 xxxxx
1 yyyy
1 zzzz
2 qqqq
2 tttt
3 dsds
3 www
i want the output should be
No of students in class 1 : 3
No of students in class 2 : 2
No of students in class 3 : 2
Answer Posted / debasish
select classname,count(studentname) from students group by
classname
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is difference between equi join and natural join?
What are sql azure firewall rules?
Which are new data types introduced in sql server 2008?
Define full outer join?
What are the difference between clustered and a non-clustered index?
Where are sql server user names and passwords stored in sql server?
What is linked report?
what stored procedure can you use to display the current processes? : Sql server administration
Hi all, can any one please tell me the difference between sql server 2008 and orace 9i
Can you get second highest salary from the table?
What are data resources?
What is the contrast amongst drop and truncate?
What is the use of keyword with encryption.
How do I determine how many instances of sql server are installed on a computer?
What is database dimension? : sql server analysis services, ssas