Skip to content
IGCSE·Tuition
ICT · Topics

Database queries and reports

A query can run without any error message and still show the wrong records, which makes the mistake easy to miss.

On this page
  1. What do you need before starting?
  2. The data used throughout
  3. An orienting example
  4. What order should you study the lessons in?
  5. Which traps catch most students?
  6. How should you use the practice set?

This module covers how to get the right records out of a database table and present them in a report: searching with several criteria, sorting, adding a calculated field, grouping and checking. It follows database structure and validation, where the table and its fields are set up.

The skills are practical. Check the current Cambridge ICT 0417 syllabus for the exact wording, and use the workflow of the software your centre teaches. The ideas stay the same across spreadsheet and database tools.

What do you need before starting?

You should know what a record, a field and a data type are, and how to open a table. Comparison symbols such as >, >=, < and <> appear throughout, so make sure you can read them aloud.

The data used throughout

Every lesson uses this invented table for a fictional school club (Harbour Hill Clubs). The people and figures are made up.

IDNameYearClubFee (RM)Sessions (of 12)
1Aiman10Chess308
2Bella11Drama4512
3Chen10Drama459
4Dewi9Chess3011
5Evan11Robotics607
6Farah10Robotics6012
7Gopal9Drama456
8Hui11Chess3010
9Imran10Chess3012
10Jia9Robotics605

An orienting example

The task: list the Chess members in Year 10 or above, highest attendance first.

The criteria are Club = “Chess” AND Year >= 10, then sort Sessions from high to low. Reading the table by hand, the Chess members are Aiman, Dewi, Hui and Imran.

Dewi is in Year 9, so she drops out. The report should show Imran (12), Hui (10), Aiman (8).

If your report shows four rows, or shows Aiman first, something in the criteria or the sort is off. That is the habit this module builds: work out the expected answer by hand, then compare.

What order should you study the lessons in?

  1. Apply multiple query criteria correctly: AND, OR and brackets decide which records appear, so start here.
  2. Sort records with a secondary key: once the right records appear, put them in the order the task asks for.
  3. Create a calculated field where supported: add a value worked out from other fields, such as attendance as a percentage.
  4. Group a report without hiding required values: subtotals and counts that keep every required detail on view.
  5. Compare displayed results with the source dataset: a method for proving a result is right before you submit it.

Which traps catch most students?

  • Mixing AND with OR without brackets, so the query answers a different question.
  • Using > when the task means “at least”.
  • Sorting by the second key only.
  • Showing a summary and losing the detail rows the task asked for.
  • Never checking the record count.

How should you use the practice set?

Try the database queries and reports practice set after the lessons. Work out each answer from the table above before you open it. The read-only SQL practice lab and the ICT practical task and evidence checker help you test your reasoning and your evidence.

A teacher can also help you build a personal checking routine. See our online one-to-one ICT tuition for how that works.

Questions people ask

Do I need to know SQL for IGCSE ICT?

The practical tasks are described in terms of search criteria, sorting, calculated fields and reports, and the software you use may offer a design grid, a wizard or typed commands. Check the current Cambridge ICT 0417 syllabus page for what your exam year expects, and use the workflow your centre teaches.

Why does this module use an invented club table?

Every example here uses one small made-up table of ten records, so you can check each answer by hand. The names and numbers are invented and do not describe real people.

What is the most common way to lose marks on a query task?

Handing in results that were never checked. A wrong bracket, a greater-than where greater-than-or-equal was needed, or a filter left switched on can all change the record count quietly. Counting the expected records by hand first catches these.

Sources

  1. Cambridge IGCSE Information and Communication Technology 0417 syllabus page

Updated:

Your next step

If your queries run but you are not sure the results are right, a one-to-one teacher can check them against the source data with you and show you a repeatable way to test.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service