In the emergency-supply warehouse, Fig. 1 stores stock records. The manager wants to find items that are either marked urgent or have fewer than 10 units. T...

Assessment: Computer Science 9210 | Paper 2 Mock 01 | Concepts and principles of computer science Subject: Computer Science - 9210

Question 1 Report

In the emergency-supply warehouse, Fig. 1 stores stock records. The manager wants to find items that are either marked urgent or have fewer than 10 units. The result should show itemName, priority and units, ordered by units from lowest to highest.

StockItemitemNamepriorityunitslocationTEXTTEXTINTEGERTEXT

(a) State the Boolean operator needed in the condition. [1]
(b) Give the complete SQL query. [7]
(c) Explain why the priority values are enclosed in quotation marks. [2]

Answer Details

OR is used because an item qualifies if either condition is true. It does not need to be both urgent and below 10 units.

  1. (a)The Boolean operator is OR. [1]
  2. (b)
    SELECT itemName, priority, units
    FROM StockItem
    WHERE priority = 'urgent' OR units < 10
    ORDER BY units ASC;
    This displays the three requested fields, accepts either qualifying condition, and sorts units from lowest to highest. [7]
  3. (c)priority stores text, and urgent is a text-string literal. It must therefore be enclosed in quotation marks. [2]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning