The three Sweet Escape tables are loaded in your browser. Type a statement and press Run (or Ctrl+Enter). You can SELECT, INSERT, UPDATE and DELETE. Referential integrity is switched on. Changes stay on this page only, and Reset data puts everything back.
SELECT Name, Price FROM PRODUCT WHERE InStock = 'Yes' AND Price < 10;
SELECT COUNT(*) FROM CUSTOMER WHERE Town = 'San Fernando';
SELECT SUM(Qty) FROM SALE WHERE ProductID = 9;
SELECT CUSTOMER.FullName, PRODUCT.Name, SALE.SaleDate FROM SALE JOIN CUSTOMER ON SALE.CustomerID = CUSTOMER.CustomerID JOIN PRODUCT ON SALE.ProductID = PRODUCT.ProductID ORDER BY SALE.SaleDate DESC;
INSERT INTO CUSTOMER VALUES (8, 'Your Name', 'Your Town', NULL); INSERT INTO SALE VALUES (13, 8, 7, 2, '2026-10-15'); SELECT * FROM SALE WHERE CustomerID = 8;
DELETE FROM SALE WHERE CustomerID = 3; DELETE FROM CUSTOMER WHERE CustomerID = 3; SELECT * FROM CUSTOMER;
Multiple-choice items in Paper 1 style and structured questions in Paper 2 style, adapted from CAPE Information Technology Unit 2 past papers. Your score and answers are saved on this device. When you have finished, submit them to your teacher at the end of this section.
Choose one answer for each item, then check. Aim for 80% or better.
Write a full answer to each part, then show the mark scheme and tick every point you earned. Marks for a part are capped at its maximum. Mark schemes are EduTech’s own; CXC does not publish them.
Question 1 [15 marks]
(a) Write an SQL query to list the Make and Model of every car with a DailyRate below $300. [3]
(b) Write an SQL statement to add a 2024 Toyota Yaris with CarID C21, a daily rate of $280 and the status Available. [3]
(c) Write an SQL statement to change the Status of car C07 to Rented. [3]
(d) Write an SQL query to count the rentals that lasted more than 7 days. [2]
(e) Write an SQL query to list each CustomerName with the Make of the car rented, in alphabetical order of customer name. [4]
Question 2 [13 marks]
| SwimmerID | Name | AgeGroup | BestTime |
|---|---|---|---|
| S1 | Ava Ramlal | U15 | 38.4 |
| S2 | Jabari Hinds | U17 | 36.9 |
| S3 | Kiara Lewis | U15 | 41.2 |
| S4 | Omari Clarke | U15 | 37.1 |
| S5 | Zara Ali | U13 | 39.8 |
(a) State the output of SELECT Name FROM SWIMMER WHERE AgeGroup = 'U15' AND BestTime < 40 ORDER BY BestTime; [3]
(b) A coach runs DELETE FROM SWIMMER; intending to remove only Zara Ali. Explain what happens and write the correct statement. [3]
(c) Race times are stored in RESULT (SwimmerID*, EventID, Time). Explain why the DBMS refuses DELETE FROM SWIMMER WHERE SwimmerID = 'S2'; while Jabari Hinds has results, and how he could be removed. [3]
(d) Distinguish between the Data Definition Language (DDL) and the Data Manipulation Language (DML), giving ONE SQL command for each. [4]
Send your multiple-choice choices and written answers to your teacher for marking. Your teacher will also see whether you opened the mark scheme or checked your answers before submitting. You can submit again if you improve your answers.
If submitting keeps failing, copy this code and send it to your teacher by email or chat:
Items are adapted from CAPE® Information Technology Unit 2 Papers 01 and 02 (2019–2026) for practice. © Caribbean Examinations Council for the original papers.