English

Differentiate between order by and group by command.

Advertisements
Advertisements

Question

Differentiate between order by and group by command.

Distinguish Between
Advertisements

Solution

Basis of Difference ORDER BY GROUP BY
Purpose Sorts result rows Forms groups of similar values
Main use Ascending or descending arrangement Aggregate calculations by group
Common functions Not necessary Used with SUM(), COUNT(), AVG() etc.
Result Ordered rows One result row per group
Example ORDER BY price DESC GROUP BY scode
shaalaa.com
  Is there an error in this question or solution?
Chapter 10: Structure Query Language - EXERCISE [Page 197]

APPEARS IN

CBSE Computer Science with Python [English] Class 12
Chapter 10 Structure Query Language
EXERCISE | Q 18. | Page 197
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×