Difficulty: Easy
Correct Answer: SELECT, FROM, WHERE
Explanation:
Introduction / Context:
SQL statements follow a defined clause order. Although the logical processing order differs from the textual order, the written sequence for a standard SELECT statement must adhere to the SQL grammar to parse and execute correctly.
Given Data / Assumptions:
Concept / Approach:
The canonical written order begins with SELECT (what columns or expressions), then FROM (which tables or joins), followed by WHERE (row-level filters). Additional clauses like GROUP BY, HAVING, and ORDER BY come later when needed.
Step-by-Step Solution:
Verification / Alternative check:
Test with: SELECT col FROM tab WHERE col > 0; The statement parses in all major RDBMSs.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing written clause order with logical evaluation (FROM/WHERE logically precede SELECT). Despite that, the required written order starts with SELECT.
Final Answer:
SELECT, FROM, WHERE
Discussion & Comments