Computer Science · May / June 2024 · Paper 22 · Question 10
0478
As printed in the paper
The question as text
A television subscription service has a new database table named Contract to store details of their subscribers’ contracts. The table contains these fields: • ContractNumber – the contract number, for example CT567 • Months – the length of the contract in months, for example 6 • EndDate – the date the contract finishes, for example 30 November 2024 • News – the news service, yes or no • Movie – the movie service, yes or no • Sport – the sports service, yes or no • Junior – the children’s service, yes or no.
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
10(a)[1]
ContractNumber
10(b)[2]
One mark for every two correct data types
Field
Data type
ContractNumber
text/alphanumeric
Months
integer
EndDate
date/time
Sport
Boolean
10(c)[3]
One mark for each point
MP1
to find the total number of months for all contracts
MP2
to find the number of contracts
MP3
… that are subscribed to News
10(d)[2]
ContractNumber
News AND Sport // Sport AND News
Example answer:
SELECT ContractNumber
FROM Contract
WHERE News // News = TRUE AND Sport // Sport = TRUE ;
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

