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

Can we use where clause in union?

1068


Explain partitioned view?

1077


What is reference section?

1003


What is clustered index

1009


How to create a view using data from another view?

948


What does it mean to normalize a database and why would you do it?

979


What is database architecture? : SQL Server Architecture

1044


Explain about merge replications?

1024


What is default constraint in ms sql server?

1035


Can a table have 2 primary keys?

983


What is raid? : SQL Server Architecture

1178


difference between Clustered index and non clustered index ?

993


What are indexes in ms sql server?

1058


What is left outer join in sql server joins?

1041


What command would you use to create an index?

1056