Question:medium

Arrange the following SQL clause in the correct order of writing a query:
A. DISTINCT
B. ORDER BY
C. WHERE
D. SELECT
Choose the correct answer from the options given below:

Show Hint

Remember the chronological syntax rule: SELECT $\rightarrow$ DISTINCT $\rightarrow$ FROM $\rightarrow$ WHERE $\rightarrow$ GROUP BY $\rightarrow$ HAVING $\rightarrow$ ORDER BY.
The DISTINCT modifier always attaches directly to the front of the projected column list inside SELECT!
Updated On: Jun 11, 2026
  • D, A, C, B
  • A, B, C, D
  • B, A, D, C
  • D, B, A, C
Show Solution

The Correct Option is A

Solution and Explanation


Step 1: Understanding the Concept:

The standard SQL syntax follows a specific sequence to ensure the database engine processes the command correctly.

Step 2: Detailed Explanation:

The logical and syntactical order of clauses in a basic SELECT statement is:
1. SELECT
2. DISTINCT (usually following SELECT)
3. FROM
4. WHERE
5. GROUP BY
6. HAVING
7. ORDER BY

Step 3: Final Answer:

Following this order (SELECT, DISTINCT, WHERE, ORDER BY), the correct sequence is D, A, C, B.
Was this answer helpful?
0


Questions Asked in CUET (UG) exam