Single lesson · Written for AQA GCSE Computer Science (8525)

SQL: SELECT, FROM, WHERE and ORDER BY – AQA GCSE Computer Science lesson (8525)

Pupils learn to write SQL with SELECT, FROM, WHERE and ORDER BY to retrieve data from one table.

Also in a bundle Software, Translators and Databases – AQA GCSE Computer Science lessons (8525) 14 lessons for £39 · save 30% on buying separately

Lesson 6 of 14 in unit 11.2 Software, Translators and Databases, taught in Year 11, Autumn 2. It answers one big question: How do we find exactly the records we need, in order?

By the end, pupils can write SQL with SELECT, FROM, WHERE and ORDER BY to retrieve data from one table.

The Build (the main task)
Write an SQL query to return the name and weight of every dog in the Pet table, heaviest first (4 marks).
Support version
Clause cards (SELECT … FROM … WHERE … ORDER BY …) to order, with the field names listed.
Challenge
Write an SQL query to return the PetID, name and species of every pet that is not vaccinated, lightest first. (4 marks) Write an SQL query to return the names of cats weighing over 4.5 kg, in alphabetical order of name. (5 marks) Sam wrote this query to list the dogs, heaviest first: GET Name, Weight FROM Pet WHERE Species == 'Dog' ORDER Weight DESC. Identify the three errors and write the corrected query. (6 marks)
Real-world link
The vet wants a list of dogs, heaviest first.
Key words
SQL, Query and Criteria, each with a definition, an icon and a common mix-up on the key vocabulary slide.
Misconceptions it tackles
“SELECT * is fine when the question names the fields”; “Any keyword works if the meaning is clear, such as GET or SEARCH”.
AQA 8525 specification
3.7.2 (SQL: SELECT, FROM, WHERE, ORDER BY, INSERT, UPDATE, DELETE).

Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.

Also sold in the Software, Translators and Databases unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.

An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.

What's included

  • Slide deck (PowerPoint)
  • Lesson plan (Word)
  • Worksheet (Word)
  • Support worksheet with scaffolds (Word)
  • Single-teacher licence: use and adapt it with your own classes

More for GCSE Computer Science (AQA)

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.