What is the difference between groupby and orderby?
Pradeep
Please refer to the following URL to know the differences between Group By and Order By Clauses,http://onlydifferencefaqs.blogspot.in/2012/08/difference-between-group-by-and-order.html
GROUP BY and ORDER BY clause are totally different.
GROUP BY clause is used with aggregate function to get the desired result. It is used for grouping of columns.
You can’t specify a WHERE clause with GROUP BY. You have to use HAVING clause for condition.
You can use Order By clause with GROUP BY.
ORDER BY is simple used to get query result in ascending order or descending order of the specified column(s)