SNHU DAD 220 MODULE 5 2026/2027 | Database Activity
Analysis & Summary | Grade A Validation | Pass
Guaranteed - A+ Graded
Section 1: SQL Query Fundamentals & Data Retrieval (Questions
1-10)
Q1. The RetailMart database has a products table with columns: product_id,
product_name, category, price, stock_quantity, and date_added. A data analyst
needs to retrieve all products in the "Electronics" category with a price greater than
$100, sorted from highest to lowest price. Which SQL query correctly accomplishes
this?
A. SELECT * FROM products WHERE category = 'Electronics' AND price > 100
ORDER BY price;
B. SELECT * FROM products WHERE category = 'Electronics' OR price > 100
ORDER BY price DESC;
C. SELECT * FROM products WHERE category = 'Electronics' AND price > 100
ORDER BY price DESC; [CORRECT]
D. SELECT * FROM products WHERE category = 'Electronics' AND price > 100
ORDER BY price ASC;
Rationale: Option C is correct because it uses AND (not OR) to require both
conditions, and DESC for descending order. A omits DESC, B uses OR which would
include non-Electronics items over $100, and D uses ASC which sorts lowest to
highest.
Correct Answer: C
,2
Q2. A manager at RetailMart wants to see all distinct product categories currently in
the database. Which SQL statement retrieves this information without duplicates?
A. SELECT category FROM products;
B. SELECT UNIQUE category FROM products;
C. SELECT DISTINCT category FROM products; [CORRECT]
D. SELECT DIFFERENT category FROM products;
Rationale: DISTINCT is the standard SQL keyword to eliminate duplicate values.
UNIQUE is a constraint keyword, not a query modifier. DIFFERENT is not valid SQL.
Omitting DISTINCT would return duplicates for categories with multiple products.
Correct Answer: C
Q3. In the RetailMart orders table, which contains columns order_id, customer_id,
order_date, total_amount, and status, which query retrieves all orders placed
between January 1, 2026 and March 31, 2026 (inclusive)?
A. SELECT * FROM orders WHERE order_date >= '2026-01-01' AND order_date <=
'2026-03-31'; [CORRECT]
B. SELECT * FROM orders WHERE order_date BETWEEN '2026-01-01' AND '2026-03-
31' AND status = 'Shipped';
C. SELECT * FROM orders WHERE order_date > '2026-01-01' AND order_date <
'2026-03-31';
D. SELECT * FROM orders WHERE order_date = '2026-01-01' OR order_date =
'2026-03-31';
Rationale: Option A correctly uses >= and <= operators to include both boundary
dates. C excludes the boundary dates. D only retrieves orders on those exact two
dates. B adds an unnecessary status filter not requested.
Correct Answer: A
, 3
Q4. The customers table has columns: customer_id, first_name, last_name, email,
phone, and registration_date. Which query retrieves the first name, last name, and
email of all customers whose last name starts with "S"?
A. SELECT first_name, last_name, email FROM customers WHERE last_name =
'S%';
B. SELECT first_name, last_name, email FROM customers WHERE last_name LIKE
'S%'; [CORRECT]
C. SELECT first_name, last_name, email FROM customers WHERE last_name LIKE
'%S';
D. SELECT first_name, last_name, email FROM customers WHERE last_name
CONTAINS 'S';
Rationale: LIKE with 'S%' matches strings starting with "S". The = operator does not
support wildcards. '%S' matches names ending with "S". CONTAINS is not standard
SQL for this purpose.
Correct Answer: B
Q5. Consider the following employees table:
Table
emp_id emp_name department salary hire_date
101 Alice Johnson Sales 55000 2023-06-15
102 Bob Smith IT 72000 2021-03-22
103 Carol White Sales 58000 2022-11-01
104 David Brown HR 48000 2024-01-10
105 Eve Davis IT 75000 2020-08-30
Which query returns employees hired after January 1, 2022, ordered by salary from
lowest to highest?