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

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

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a view in sql?

926


What does it mean if @@cursor_row returns a negative number?

941


What is built-in function?

928


What are views used for?

967


Explain what are the events recorded in a transaction log?

935


How do I view a stored procedure in sql server?

943


How to concatenate two character strings together?

1055


What are the 10 characteristics of data quality?

899


How to create hyperlink from returned sql query ?

1070


Can we write a distributed query and get some data which is located on other server and oracle database?

1175


Explain error handling in ssis?

963


What are the types of resultset?

914


List down some advantages of sql stored procedure?

902


What are the different types of replication are there in sql server 2000?

981


What is transaction server consistency?

979