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...

Why we need a group by clause?

Answer Posted / vampire007

We use GroupBy clause to analyze data in table,by means of
various sql server aggregate functions like SUM(), AVERAGE
() etc., according to some domain.

For eg., If we want to know the sales done by a every
employee, then we would use somewhat this kind of query:

/**
select employeeid, count(*)
from orders
groupby employeeid
order by employeeid
**/

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the truncate command? : SQL Server Architecture

1227


What are the restraints imposed on the table design by a merge replication?

1087


Can a table be moved to different filegroup?

1024


What are two difference between sql azure and azure tables?

161


What is the difference between system objects and user objects?

1210


What is difference between aggregate and analytic function?

975


How to get the number of affected rows?

1053


How to start sql server browser service?

1177


What is an indexing technique?

978


Suggest a method of joining two tables.

1228


What is the difference between deallocate cursor and close cursor?

1328


what is a check constraint?

1169


What is self contained sub query?

1117


Explain trigger and its types?

1114


What is t-sql script to take database offline – take database online.

1131