Question 1 Report
The table below is from a holiday apartment database. The owner is creating a mailing list for guests who stayed for at least seven nights and spent more than 600 dollars. The owner needs guest names and email addresses only. They will use the query results to create a report and then save it as evidence for a marketing task. GuestID is included so that identical names do not cause records to be confused.
| GuestID | GuestName | NightsStayed | TotalCost ($) | |
|---|---|---|---|---|
| G220 | Ada King | 5 | 720 | ada@example.com |
| G221 | Sam Liu | 8 | 640 | sam@example.com |
| G222 | Hana Cole | 10 | 580 | hana@example.com |
| G223 | Omar Shah | 7 | 605 | omar@example.com |
The original accommodation records must remain available for reception staff. The owner will not paste email addresses into a public document.
(a) Identify the GuestID values that should appear in the mailing list. [2]
(b) Create the criterion for NightsStayed. [1]
(c) Create the criterion for TotalCost. [1]
(d) Explain why GuestID is useful even when GuestName is stored. [1]
(a) A guest must satisfy both conditions: at least seven nights and more than 600 dollars. G221 stayed 8 nights and spent 640 dollars; G223 stayed 7 nights and spent 605 dollars. The GuestID values are G221 and G223. [2]
(b) Use >=7 for NightsStayed. [1]
(c) Use >600 for TotalCost. [1]
(d) GuestID is useful because it is unique. Names can be duplicated or changed, so a name alone may not identify the correct guest record. [1]
Everything you need to excel in your exams