ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions
4 marks · SQL SELECT
The following SQL statement is implemented in the database. SELECT forename, surname FROM Result WHERE test1 < 10 OR test2 > 90; Write the expected output from the SQL statement. Describe how the above SQL statement could be tested. A database table stores the following data. Result forename surname test1 test2 Julie White 7 92 Aaima Waheed 34 67 Chun Yang 27 52 Olivia Arran 58 98 Mia Branan 78 90 Claire McKay 10 7 Scott Harper 42 47
One mark for two correct headings, in correct order • forename, surname One mark for each row of the search results • Julie White • Olivia Arran Example output: forename surname Julie White Olivia Arran Output must appear on a line on its own. Ignore the table name if it is included in the answer. If the search results include Julia and Olivia and any additional rows: • award 1 mark instead of the 2 available for the search results. Compare expected results to actual results.