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 | |
|---|---|---|
| 1ORDER BY price ASC | A9 < 10 | |
| 2ORDER BY orderDate DESC | BSorts rows by price from smallest to largest, using true number order when price is a number field | |
| 3In a text field, '10' sorts before '9' because text is compared one character at a time | CSorts rows by date with the newest first, because a date field follows time order | |
| 4A number field sorts by true value, so 9 comes before 10 | DText dates sort alphabetically, so '3 Feb' comes after '25 Jan'. Use a date field or the YYYY-MM-DD form so dates sort in time order. | |
| 5Storing stock as text, then using ORDER BY stock ASC and expecting 9 before 10 | E'10' < '9' | |
| 6Storing dates as text like '3 Feb 2026' and then using ORDER BY orderDate | FText sorts letter by letter, so '10' comes before '9'. The stock field should be a number data type such as integer. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
'10' < '9' — In a text field, '10' sorts before '9' because text sorts letter by letter. Number and date fields sort by true value, so 9 comes before 10 and dates follow time order.SELECT name, price FROM products
ORDER BY price;SELECT firstName, points FROM students
ORDER BY points DESC;SELECT orderId, orderDate FROM orders
ORDER BY orderDate;CREATE TABLE t (name TEXT, mark INTEGER);SELECT * FROM orders
ORDER BY orderDate DESC;