Question:
How do I use the Group By statement in SQL Query?
Answer:
Group By is a way to collapse a result set around a textual value summarizing its contents by some aggregate value.
Typically, we look for a count or a sum of some numbers with respect to some textual value, so we may ask for the COUNT of EMPLOYEES grouped by DEPARTMENT NUMBER or the SUM of LINEITEMS grouped by ORDER NUMBER.