Question 1
1 markThe table shows the database table Bookings for a hotel.
Give the output from this SQL query:
SELECT SUM(Cost)
FROM Bookings
WHERE RoomType = 'Double';Model answer
1025.00
Explanation
Three bookings are for a Double room: 285.00 + 170.00 + 570.00 = 1025.00. SUM returns one total, not a list of values.
Mark scheme
-
1 mark
1025 (1025.00)