No products in the cart.

What is the difference between Group …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

What is the difference between Group by and Order by clause?
  • 1 answers

Sia ? 2 years, 9 months ago

S.NO GROUP BY ORDER BY
1. Group by statement is used to group the rows that have the same value. Whereas Order by statement sort the result-set either in ascending or in descending order.
2. It may be allowed in CREATE VIEW statement. While it does not use in CREATE VIEW statement.
3. In select statement, it is always used before the order by keyword. While in select statement, it is always used after the group by keyword.
4. Attribute cannot be in the group by statement under aggregate function. Whereas in order by statement, attribute can be under aggregate function.
5. In group by clause, the tuples are grouped based on the similarity between the attribute values of tuples. Whereas in order by clause, the result-set is sorted based on ascending or descending order.
6. Group by controls the presentation of tuples(rows). While order by clause controls the presentation of columns.
http://mycbseguide.com/examin8/

Related Questions

DBMS
  • 1 answers
Founder of python
  • 2 answers
Question no 31 case 2024
  • 0 answers
What is pandas
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App