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 are “unrepeatable reads”?
How to change a login name in ms sql server?
What is filter index?
Define synonym?
When to use null data driven subscription?
What is lock escalation? : sql server database administration
How to list all login names on the ms sql server?
What is clustered primary key?
How will you go about resolving deadlocks?
What is difference between commit and rollback when used in transactions?
What are the authentication modes in sql server? How can it be changed?
what does the automatic recovery do? : Sql server administration
What can be used instead of trigger?
What is the log shipping?
i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.