Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / ramadass

select classname,count(*) from students group by
classname

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name some of the open source software that you can use in alternative to SSR?

170


What are difference between Cluster index and Non-Cluster index?

1137


How optimize sql query with multiple joins in sql server?

958


What is a document index?

1075


What is sqlcmd?

1140


What is constraints and its types?

1001


What is the maximum size of sql server database?

1066


How do I open a .db file?

1086


What is difference between createstatement and preparedstatement?

1176


What is a mutating table error and how can you get around it?

1130


What is 1nf normalization form?

1085


What are the difference between primary keys and foreign keys?

1022


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

1202


How to enable/disable indexes?

1128


What is the latest version of microsoft sql server?

1118