Counting and summarising with a query
A query function like COUNT, SUM, AVG, MIN or MAX that looks at many records and gives one answer, such as how many records match or the average of a field.
Understanding Counting and summarising with a query in Years 7–8 Data & Information
What it does: COUNT(*) with a WHERE criteria counts only the matching records, so only the dogs are counted. AVG(Price) summarises the Price field across all records and returns a single average. An aggregate function looks at many records and gives back ONE answer. 'How many' is a job for COUNT(*). 'Average' needs AVG on a field such as Age. AVG adds up the Score values and divides by how many there are, giving one answer for the whole field. A query needs FROM before the table name. The correct version is SELECT COUNT(*) FROM Students WHERE Year = 8.
Common mistakes: Text values in a query criterion need quote marks. Without them, Dog looks like a field name. It should be AND Pet = 'Dog';. A query criterion uses a single = to compare values, not ==. It should be WHERE Subject = 'Maths';.
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 47–80) and word search (Modules 9–80).
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
aggregate functionFill in the Blanks
Spot the Error
Student with a class code? Join your class →