Why we need a group by clause?

Answers were Sorted based on User's Feedback



Why we need a group by clause?..

Answer / sd

While using aggregate functions.

Is This Answer Correct ?    7 Yes 1 No

Why we need a group by clause?..

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

Why we need a group by clause?..

Answer / satyanarayana

In order to provide a condition to the select statement
either by group by column or aggregate function

Is This Answer Correct ?    1 Yes 0 No

Why we need a group by clause?..

Answer / ricky

while we are using a aggregate function we use the group by
clause....

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More SQL Server Interview Questions

What is difference in performance between insert top (n) into table and using top with insert?

1 Answers  


What is scheduled job and how to create it?

1 Answers  


Explain try...catch with sql server?

1 Answers  


What will be the maximum number of indexes per table?

1 Answers  


Define outer join in sql server joins?

1 Answers  


How to find the login name linked to a given user name?

1 Answers  


What are the tables in sql?

1 Answers  


What number aggregate functions are accessible there in sql?

1 Answers  


Explain stored procedure?

1 Answers  


How connect excel to sql server?

1 Answers  


How to how to convert numeric expression data types using the convert() function??

1 Answers  


Where are full-text indexes stored?

1 Answers  


Categories