Why we need a group by clause?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / ricky
while we are using a aggregate function we use the group by
clause....
Is This Answer Correct ? | 2 Yes | 1 No |
Where the sql logs gets stored? : sql server database administration
What are the steps you can take to avoid “deadlocks”?
How sql server executes a statement with nested subqueries?
Which command is used for user defined error messages?
create procedure proc1 (@a int) as begin if @a=1 create table #temp(a1 int) else create table #temp(a1 int) end while executeing the above code it shows error like '#temp already exist' .why it shows an error?
IN Vs OR operator which is best to use sql server.
Is it possible in sql table to have more than one foreign key?
What is the difference between windows authentication and sql server authentication
hi i gone though satyam interview. what is Acid Properties?
how we can use a database with php.
What is data source object?
write an SQL query to list the employees who joined in the month of January?