What is the difference between GROUP BY and ORDER BY in
Sql?
Answer Posted / haritharavi
Order by clause is used to sort the rows in ascending or
descending order.Group by clause is used to sort/group a
number of rows together so as to apply aggregate functions.
So order by is only to sort the records where as group by
is to sort and find aggregate functions of each group.
| Is This Answer Correct ? | 32 Yes | 5 No |
Post New Answer View All Answers
How to convert character strings to dates?
What are the differences between a primary key and foreign key?
Is mysql and sql are same?
How to get the number of rows selected or affected by a sql statement?
Can you tell a way to know the number of days between the two given dates in php?
How can you retrieve a portion of any column value by using a select query?
What is clob in mysql
How to get data from mysql in php?
Is mysql port 3306 tcp or udp?
Write a command to list all databases in mysql?
What is the maximum size of table in mysql?
What can I do with mysql?
What are the other commands to know the structure of a table using mysql commands except explain command?
Is mariadb faster than mysql?
How do I delete a table in mysql workbench?