ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions

Higher Computing Science 2026 Question 14

7 marks · Keys and the data dictionary

Identify the primary key used in the Result table. A query was created to display the average number of points from the whole tournament. This query was saved as ‘OverallAverage’ and the output is shown below. AveragePoints 46.69 Using the query ‘OverallAverage’, complete the SQL statement below to display the archers’ names and the events where they scored more than the average points. The expected output is shown below. forename surname eventName points Euan Dilloway 10 m Shot 50 Euan Dilloway Target Shoot 67 Pandora Audley Target Shoot 55 Kelsie Buckthorpe Target Shoot 60 Pandora Audley Mountain Range 57 Kelsie Buckthorpe Mountain Range 58 Locke Turfus Mountain Range 65 SELECT forename, surname, eventName, points The organisers want to know the number of times a left‑handed archer competed in a lawn event. The expected output from the query is shown below. Left‑handed lawn archers 4 Design a query to display the output above. Field(s) and calculation(s) Table(s) Search criteria Grouping Sort order An archery club runs an annual tournament. The entries and scores for the tournament are held in three database tables. Sample data from each table is shown below. Event eventID eventName type extraMarshals Ev1 10 m Shot Lawn False Ev2 20 m Shot Lawn False Ev3 Target Shoot Forest True Ev4 Mountain Range Hills True … … … … Archer archerID forename surname style A1 Euan Dilloway Right‑handed A2 Pandora Audley Right‑handed A3 Kelsie Buckthorpe Left‑handed A4 Locke Turfus Left‑handed … … … … Result eventID archerID points Ev1 A1 50 Ev1 A2 45 Ev1 A3 45 Ev1 A4 40 Ev2 A1 20 Ev2 A2 30 Ev2 A3 35 Ev2 A4 40 Ev3 A1 67 Ev3 A2 55 Ev3 A3 60 Ev3 A4 40 Ev4 A1 40 Ev4 A2 57 Ev4 A3 58 Ev4 A4 65 … … …

Marking scheme

eventid, archerID Both required. • FROM clause includes ‘Overall Average’ • points > AveragePoints • Archer, Event, Result tables with joins Example answer: SELECT forename, surname, eventName, points FROM Archer, Event, Result, OverallAverage WHERE Archer.archerID = Result.archerID AND Event.eventID = Result.eventID AND points > AveragePoints; • COUNT aggregate function • three tables • type = "Lawn" and style = "Left- handed" Field(s) and Calculations COUNT(*) Table(s) Event, Result, Archer Search Criteria type = "Lawn" AND style = "Left-handed" Grouping Sort Order

Previous question: Higher Computing Science 2026 Question 13

Next question: Higher Computing Science 2026 Question 15