What is the difference between GROUP BY and ORDER BY in
Sql?
Answer Posted / zaid manzoor
The ORDER BY keyword is used to sort the result-set.
The ORDER BY Keyword
The ORDER BY keyword is used to sort the result-set by a specified column.
The ORDER BY keyword sort the records in ascending order by default.
If you want to sort the records in a descending order, you can use the DESC keyword.
SQL ORDER BY Syntax
Aggregate functions often need an added GROUP BY statement.
The GROUP BY Statement
The GROUP BY statement is used in conjunction with the aggregate functions to group the result-set by one or more columns.
Is This Answer Correct ? | 19 Yes | 5 No |
Post New Answer View All Answers
Hi Team, This is kartik, I recently completed my B-tech. Importance of posting this question is for to know the best books on SQL(MYSQL/Oracle)? I like SQL concept's so much, at the same time i decided to choose SQL for my career purpose. So please suggest me the best books that are very helpful for a fresher to improve concepts like (SQL/PLSQL)Basics, programming concepts, architectures etc. Please consider my request as an important one. I am very thankful to you for providing this opportunity. If possible can you please send the names of books for my personal id also: karthikgdv1206@yahoo.com. Thanks, Kartik T
What is trigger in mysql?
Can you tell the reasons for selecting lamp(linux, apache, mysql, php) instead of any other combination of software programs, servers, and operating system?
Write a query to fetch common records between two tables using mysql?
How do I stop a query in mysql workbench?
What does innodb stand for?
Can you tell the difference between mysql_fetch_object and mysql_fetch_array?
What is a mysql model?
What is mysql server?
What is horizontally scalable?
What is the difference between a heap table and temporary table?
How you will Show unique records.
How to insert dynamic values in mysql using php?
Can we write pl sql mysql?
Which storage engine is best in mysql?