SQL dropdown query from product results

2025-familiarisation-se-q02 · Fill in the Blanks · 3 marks

Source: NESA 2025 HSC Software Engineering Familiarisation Q2

Question

An online business is planning to use a database to keep track of its products. The contents of the Products table during testing are shown.

ProductID ProductName ProductPrice
P001 The Plant (DVD) 28.00
P002 Discovery 1 and 2 (DVD) 26.98
P003 Travel 1 and 2 (Blu-Ray) 22.00
P004 The Best Movie (DVD) 19.98
P005 Celebration (DVD) 12.00

After executing a SQL query, the following results were obtained.

ProductName ProductPrice
Discovery 1 and 2 (DVD) 26.98
The Plant (DVD) 28.00
Travel 1 and 2 (Blu-Ray) 22.00

Select the correct item from each dropdown menu to show how the results were obtained.

SELECT <span class="blank-control"><span class="blank-marker" aria-hidden="true">1</span><select id="blank-select_1" name="select_1" aria-label="Blank 1"><option value=""></option><option value="ProductID">ProductID</option><option value="ProductName">ProductName</option><option value="ProductPrice">ProductPrice</option><option value="Products">Products</option></select></span>, <span class="blank-control"><span class="blank-marker" aria-hidden="true">2</span><select id="blank-select_2" name="select_2" aria-label="Blank 2"><option value=""></option><option value="ProductID">ProductID</option><option value="ProductName">ProductName</option><option value="ProductPrice">ProductPrice</option><option value="Products">Products</option></select></span>
FROM <span class="blank-control"><span class="blank-marker" aria-hidden="true">3</span><select id="blank-from_table" name="from_table" aria-label="Blank 3"><option value=""></option><option value="Products">Products</option><option value="Customers">Customers</option><option value="Orders">Orders</option></select></span>
WHERE <span class="blank-control"><span class="blank-marker" aria-hidden="true">4</span><select id="blank-where_field" name="where_field" aria-label="Blank 4"><option value=""></option><option value="ProductID">ProductID</option><option value="ProductName">ProductName</option><option value="ProductPrice">ProductPrice</option></select></span> <span class="blank-control"><span class="blank-marker" aria-hidden="true">5</span><select id="blank-where_operator" name="where_operator" aria-label="Blank 5"><option value=""></option><option value="=">=</option><option value="&gt;">&gt;</option><option value="&gt;=">&gt;=</option><option value="&lt;">&lt;</option></select></span> <span class="blank-control"><span class="blank-marker" aria-hidden="true">6</span><select id="blank-where_value" name="where_value" aria-label="Blank 6"><option value=""></option><option value="12.00">12.00</option><option value="19.98">19.98</option><option value="22.00">22.00</option><option value="28.00">28.00</option></select></span>
ORDER BY <span class="blank-control"><span class="blank-marker" aria-hidden="true">7</span><select id="blank-order_field" name="order_field" aria-label="Blank 7"><option value=""></option><option value="ProductID">ProductID</option><option value="ProductName">ProductName</option><option value="ProductPrice">ProductPrice</option></select></span> <span class="blank-control"><span class="blank-marker" aria-hidden="true">8</span><select id="blank-order_direction" name="order_direction" aria-label="Blank 8"><option value=""></option><option value="ASC">ASC</option><option value="DESC">DESC</option></select></span>
Reveal answer
  • 1: ProductName
  • 2: ProductPrice
  • 3: Products
  • 4: ProductPrice
  • 5: >=
  • 6: 22.00
  • 7: ProductName
  • 8: ASC

Marking rubric

MarksDescription
3Correctly completes the SQL clauses.
2Correctly completes most SQL clauses.
1Shows some understanding of SQL query clauses.

Explanation

The results include products priced at 22.00 or more and are sorted alphabetically by name.

Metadata

Submitter
Seed data
Created
2026-05-02
Status
published
Syllabus
y12-web-sql-scripts
Tags
SQL SELECT WHERE ORDER BY databases