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 |
How to achieve Paging of records in SQL SERVER?
0 Answers Petranics Solutions,
how can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role? : Sql server administration
how to determine the service pack currently installed on sql server? : Sql server database administration
When you use @@error and try-catch?
How to find the date and time of last updated table?
How to create user messages with print statements in ms sql server?
How to perform backup for certificates in sql server? : sql server security
What is difference between restoration and recovery in SQLServer?
what is create database syntax? : Sql server database administration
What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?
I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that
What is CTE in SQL