Grade 12 · Databases & SQL · SQL lab · about 18 minutes
Open this task in the Delphi workspace →
SQL (Structured Query Language) asks the database questions. The skeleton:
SELECT fields which columns you want (* = all)
FROM tblLearners which table
WHERE condition which rows qualify (optional)
ORDER BY field DESC how to sort (optional)
Conditions look like Delphi's but with single = and no brackets needed: Grade = 12, ITMark >= 75, Province = 'Gauteng' (text in single quotes!). Combine with AND/OR. Patterns use LIKE with % as the wildcard: Surname LIKE 'M%' — surnames starting with M.
ORDER BY Surname sorts A→Z; add DESC for highest-first. This is the tblLearners table you are querying — the DBGrid below the editor shows live results every time you press Run.
Province = 'Gauteng' but Grade = 12. Mixing that up is the most common lost mark in the SQL question.