Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1SELECT COUNT(*) FROM Students WHERE Year = 7 | AAVG needs a field name to average, such as AVG(Score). The star only works with COUNT, which counts records. | |
| 2SELECT AVG(Score) FROM Results | BThe FROM keyword is missing, so the query doesn't say which table to count. It should be FROM Students. | |
| 3Find the total number of records in a Pets table that are dogs | CSELECT AVG(Price) FROM Canteen | |
| 4Find the average price of every item in a Canteen table | DSELECT COUNT(*) FROM Pets WHERE Type = 'Dog' | |
| 5SELECT AVG(*) FROM Results | EWorks out the average of all the values in the Score field | |
| 6SELECT COUNT(*) Students WHERE Year = 8 | FCounts how many records in Students have a Year of 7 and gives back one number |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
aggregate function — A query function like COUNT, SUM, AVG, MIN or MAX that looks at many records and gives one answer, such as how many records match or the average of a field.SELECT COUNT(*) FROM Pets;SELECT COUNT(*) FROM Pets WHERE Age > 5;SELECT AVG(Score) FROM Results;SELECT COUNT(*) FROM Games;SELECT MAX(Score)
FROM Results
WHERE Year = 7;