Clause order in a full SQL query
The order of clauses in a full SQL query: SELECT, FROM, WHERE, then ORDER BY. WHERE filters the rows first, then ORDER BY sorts the rows that are left.
Understanding Clause order in a full SQL query in IGCSE Computer Science Paper 2
What it does: FROM names the table, then WHERE keeps only the rows that match the condition. Sorting happens later. Each clause is on its own line with capital keywords. Only the last line has a semicolon, because it ends the whole statement. A full query always runs in the order SELECT, FROM, WHERE, ORDER BY. FROM must come before WHERE.
Common mistakes: A full query starts with SELECT, which lists the fields to show. FROM comes second and names the table. Line 1 should be SELECT firstName, points. The semicolon marks the end of the whole statement, so it goes after the last clause. Line 4 should be ORDER BY price;.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 525–538) and word search (Modules 500–538).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
SELECT FROM WHERE ORDER BYFill in the Blanks
Spot the Error
Student with a class code? Join your class →