CBSE Class 12 Informatics Practices
Question 7 of 79
Database Query using SQL — Question 7
Back to all questions 7
Question Assertion (A): GROUP BY clause is always preceded by ORDER BY clause in a SELECT statement.
Reasoning (R): ORDER BY clause always follows other clauses.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Both A and R are true and R is the correct explanation of A.
Explanation
In SQL syntax, the GROUP BY clause comes before the ORDER BY clause. The standard order of clauses is SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY. On the other hand, it is true that the ORDER BY clause always follows other clauses, as it comes after the other clauses in the statement.