FREE TOOL · IGCSE AND A LEVEL
SQL Practice Online: IGCSE SQL Playground with Challenges
Practise SQL right here in your browser. Type a query, press Run and see the result straight away. Then try the 10 self-marking challenges, written in the style of Cambridge IGCSE Computer Science Paper 2. If you make a mistake, the playground tells you what is wrong in plain English.
The Students table
StudentID is the primary key. Text values go in quotes, e.g. Form = '10A'. Numbers and TRUE / FALSE do not.
Challenges
Your SQL query
Result
Press Run to see the result.
Supports the IGCSE 0478 SQL: SELECT, FROM, WHERE with = <> > < >= <=, AND, OR, ORDER BY … ASC / DESC, SUM and COUNT.
The order of an SQL query
Every query follows the same order: SELECT the fields, FROM the table, WHERE a condition is true, then ORDER BY a field. Only SELECT and FROM are needed every time.
SQL keywords you need for IGCSE
SELECT: which fields to show (*means all fields).FROM: which table to use.WHERE: which records to show, using = <> > < >= <= with AND and OR.ORDER BY: sort the results, ASC (A to Z, lowest first) or DESC (highest first).SUM: add up the values in a numeric field.COUNT: count the records that match.
Worked exam-style example
Question: Using the Students table above, write an SQL query to show the Name and Score of every student in form 10A who has paid, with the highest score first. [4 marks]
SELECT Name, Score FROM Students WHERE Form = '10A' AND Paid = TRUE ORDER BY Score DESC;
- 1 mark: SELECT Name, Score
- 1 mark: FROM Students
- 1 mark: WHERE Form = ’10A’ AND Paid = TRUE
- 1 mark: ORDER BY Score DESC
Result: Hugo 88, Amir 72, Chen 64. Paste the query into the box above to check it. A common slip is leaving the quotes off ’10A’, because it is text.
Exam tips
- Copy the field and table names exactly as they appear in the question.
- Text values go in quotes; numbers and TRUE/FALSE do not.
- Only show the fields the question asks for. SELECT * is usually wrong in the exam.
Revise the full topic: IGCSE databases and SQL · A Level databases
Frequently asked questions
Can I practise SQL online for IGCSE?
Yes. The SQL practice tool runs queries in your browser on example tables, so you can try SELECT, WHERE, ORDER BY, SUM and COUNT.
What SQL do I need for IGCSE Computer Science 0478?
SELECT, FROM, WHERE, ORDER BY with ASC or DESC, SUM and COUNT, together with AND, OR and comparison operators.
What SQL do I need for A Level 9618?
DDL such as CREATE DATABASE, CREATE TABLE, ALTER TABLE and keys, and DML such as SELECT with INNER JOIN, GROUP BY, ORDER BY, SUM, COUNT and AVG, INSERT INTO, UPDATE and DELETE FROM.
More free tools: Binary, denary and hex converter · Truth table generator · All tools