← Years 5–6 Data & Information

Sorting data

Sorting puts the rows of a table in order using the values in one column, like A to Z or smallest to largest, and keeps each row together.

Understanding Sorting data in Years 5–6 Data & Information

What it does: The sort uses the values in one column, Name, and the rows go in order from A to Z. Choosing the Price column and smallest to largest puts the lowest price in the top row. A to Z means alphabetical order, starting with A. Z to A would be the other way around. Smallest to largest starts with the smallest number and ends with the biggest. Sorting moves whole rows. If only one column moved, the names would no longer match the right scores. Always sort the whole table so every row stays together. Otherwise the data no longer matches.

Common mistakes: The column chosen on line 2 is Age, so the sort must use Age. Sorting by Name would give A to Z order, not smallest to largest. It should be: sort pets by column, order. Sorting one column on its own pulls its values away from the rest of their rows. You must sort the whole table by column B so each row stays together.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 11–20) and word search (Modules 1–20).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Sorting a table by the Name column from A to Z puts the rows in which order?
Dev, Cara, Ben, AnaAna, Ben, Cara, Dev
Matches
Only the Score column was sorted. The Name column stayed in the same order.
↓
The columns were sorted separately, so each score no longer matches its name. The fix is to sort the whole table so each row stays together.
Applying
Meanings
Term
Sort
Meaning
Sorting puts the rows of a table in order using the values in one column, like A to Z or smallest to largest, and keeps each row together.
Practice
Select all the data, including headings
Testing
Gaps
the table by the Score column
Check Answer
Spots
3order ← smallest to largest
4sort pets by Name, order

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Camel' badge — Endurance Champion, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Sorting a table by the Name column from A to Z puts the rows in which order?
A. Ana, Ben, Cara, Dev ✓
B. Dev, Cara, Ben, Ana
A to Z means alphabetical order, starting with A. Z to A would be the other way around.
2. Which choice shows sorting numbers from smallest to largest?
A. 3, 8, 15, 42 ✓
B. 42, 15, 8, 3
Smallest to largest starts with the smallest number and ends with the biggest.
3. A table has Name and Score columns. You sort by Score. What happens to each student's name?
A. It moves with their score, so the row stays together ✓
B. It stays where it was while the scores move
Sorting moves whole rows. If only one column moved, the names would no longer match the right scores.
4. Sorting reorders the rows of a table using the values in how many columns (in a simple sort)?
A. Every column at once
B. One column ✓
A simple sort uses the values in one column to decide the order of the rows.
5. Mia sorts only the Age column in her table. Her Name column stays still. What went wrong?
A. Nothing went wrong, because sorting only needs one column to move
B. The rows were not kept together, so names and ages are now mixed up ✓
Always sort the whole table so every row stays together. Otherwise the data no longer matches.

Match the Pairs

Sort A to Z → Puts the rows in alphabetical order using the text in one column
Sort smallest to largest → Puts the rows in order from the lowest number to the highest number in one column
To put a class list in alphabetical order by Name, sort the Name column → Sort by Name (A to Z)
To see the cheapest snack first, sort the Price column from smallest to largest → Sort by Price (smallest to largest)
Only the Score column was sorted. The Name column stayed in the same order. → The columns were sorted separately, so each score no longer matches its name. The fix is to sort the whole table so each row stays together.
Sort by Age: 12, 9, 11, 10 (smallest to largest) → These ages are not in order from smallest to largest. The correct order is 9, 10, 11, 12.

Key Term

Sort
Sorting puts the rows of a table in order using the values in one column, like A to Z or smallest to largest, and keeps each row together.

Fill in the Blanks

1. Sort the table by the Score column
Hint: Type the action word that puts the rows of a table in order.
2. Sort the Name column from A to Z
Hint: Type the order that starts at the beginning of the alphabet and ends at the end.
3. Sort Score from smallest to largest
Hint: Type the word that describes the biggest numbers, which come last in this order.
4. Sorting keeps each row together
Hint: Type the part of a table that holds one person's Name and Score side by side.
5. Columns: Name, Score (points) Sort the rows by Score, largest to smallest
Hint: Type the name of the column that holds the numbers being put in order.

Spot the Error

Question 1
A pets ← table of Name, Age
B column ← Age
C order ← smallest to largest
D sort pets by Name, order
Line D — The column chosen on line 2 is Age, so the sort must use Age. Sorting by Name would give A to Z order, not smallest to largest. It should be: sort pets by column, order.
Question 2
A Select the whole table A1:C6
B Sort column B on its own
C Check each row stayed together
Line B — Sorting one column on its own pulls its values away from the rest of their rows. You must sort the whole table by column B so each row stays together.
Question 3
A names ← Zoe, Ali, Mia
B sort names A to Z
C result ← Zoe, Mia, Ali
Line C — A to Z means alphabetical order, so the result should be Ali, Mia, Zoe. The broken line shows Z to A.
Question 4
A scores ← 12, 5, 30, 8
B sort scores smallest first
C result ← 30, 12, 8, 5
Line C — Sorting smallest first puts the numbers in order from smallest to largest: 5, 8, 12, 30. The broken line shows largest to smallest.
Question 5
A Before: Mia 10, Ali 8, Zoe 9
B Sort by Name, A to Z
C After: Ali 10, Mia 8, Zoe 9
Line C — Each row must stay together when sorting. Ali's number should still be 8 and Mia's should still be 10. It should be: After: Ali 8, Mia 10, Zoe 9.

Student with a class code? Join your class →