Still loading. This can take a moment on a slow connection.
Still loading. This can take a moment on a slow connection.
Predict what a query returns, write queries that pick out the records a question asks for, and find each table’s primary key.
PredictHow many records will this query return? Answer in the guide before you run it.
| 1 | Amira | 10A | R | 82 | TRUE |
| 2 | Bilal | 10B | G | 49 | FALSE |
| 3 | Chen | 10A | B | 70 | FALSE |
| 4 | Dina | 10B | R | 50 | TRUE |
| 5 | Eli | 10A | G | 95 | FALSE |
| 6 | Farah | 10B | B | 38 | FALSE |
| 7 | Amira | 10B | Y | 64 | FALSE |
The result is hidden until you predict.
How many records will the query return? Predict it in the guide, or run the query to see.
How many records will this query return?
SELECT Name FROM Students WHERE Score > 50Read it clause by clause against the Students table. It runs once you answer.
Choose a question, write a query that answers it, and run it. It is marked by the records it returns, so any query that returns the right ones is right.
After you check a prediction, this says why.
Try what you found on the lesson’s 42 marked questions. Practise in Database Concepts
One record for each student: their form, their house, their score in a test and whether they are a prefect. Two students share a name.
Primary key
Which field of Students identifies each record?
One table at a time, as the syllabus’s databases have. The lab runs SELECT, FROM, WHERE with =, <>, <, >, <= and >= joined by AND or by OR, ORDER BY with ASC or DESC, and COUNT and SUM. Text and dates go in quotation marks, and a date is written year first, such as ’2022-01-01’, so that dates sort in order.
A query is marked by what it returns, so any query that returns what the question asks for is right, however it is written.