ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions
2 marks · Aggregate functions and grouping
The database table below contains some sample data on various walking tours around Scotland. Tour tourID tourName season location miles guided E2 Spooktacular Autumn Edinburgh 5 False E5 Tay Forest Walk Summer Pitlochry 7 False W1 Cobbler’s Way Spring Arrochar 7 True E4 Tentsmuir Trek Summer St Andrews 9 True N7 Rocks and Shoals Spring Thurso 4 True S3 Hen’s Farm Spring Galashiels 3 False W4 Loch Ryan Tour Summer Stranraer 14 False N8 Deeside Walk Winter Aberdeen 1 False N2 Ski Country Winter Aviemore 10 False C6 Castle Tour Autumn Stirling 7 False C1 Lornty Nature Trail Summer Blairgowrie 8 True W3 Storr’s View Autumn Skye 9 True W2 Festive Lights Winter Glasgow 6 False … … … … … … The following SQL statement is used to display the shortest guided tour for each season. SELECT season, MIN(miles) AS [Shortest route] FROM Tour WHERE guided = True GROUP BY season ORDER BY MIN(miles) DESC; Using the sample data provided, write the expected output from the SQL statement above. season Shortest route
Season Shortest Route Autumn 9 Summer 8 Spring 4 Three correct records. Correct sort order.
Previous question: Higher Computing Science 2026 Question 11