Deepak Verma
Difference Between ORDER BY Clause and GROUP BY Clause in SQL?
By Deepak Verma in SQL on Apr 05 2011
  • Munesh Sharma
    Jun, 2015 19

    http://www.essentialsql.com/what-is-the-difference-between-group-by-and-order-by/

    • 0
  • Rahul Prajapat
    May, 2015 30

    Order By is used for sorting of data either in ascending order or in descending order where Group By is used for combining the value of unique combination .Group by used when any aggregate function is used in query..

    • 0
  • Pankaj  Kumar Choudhary
    May, 2015 21

    Order By is used for sorting of data either in ascending order or in descending order where Group By is used for combining the value of unique combination .Group by used when any aggregate function is used in query..

    • 0
  • Nirav Vasoya
    Apr, 2015 21

    On the surface both clauses appear to do the same thing, that is sort data. But this is where their similarities end. Both serve entirely different purposes. -> ORDER BY clause's purpose is to sort the query result by specific columns. -> GROUP BY clause's purpose is summarize unique combinations of columns values.

    • 0
  • Sathish DV
    Apr, 2011 6

    ORDER BY alters the order in which items are returned.

    GROUP BY will aggregate records by the specified columns which allows you to perform aggregation functions on non-grouped columns (such as SUM, COUNT, AVG, etc)

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS