Module 02 Knowledge Check
5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.
1. Why is SELECT * risky in analysis queries you intend to keep?
- A. It is always slower
- B. Column order and set can change upstream, silently changing your result
- C. It is invalid SQL
- D. It ignores WHERE clauses
2. ORDER BY with LIMIT 10 and no tie-breaking column can return…
- A. Always the same 10 rows
- B. Different rows between runs when values tie
- C. An error
- D. All rows
3. In which order does the database logically apply these?
- A. SELECT then WHERE then ORDER BY
- B. WHERE then SELECT then ORDER BY
- C. ORDER BY then WHERE then SELECT
- D. SELECT then ORDER BY then WHERE
4. WHERE status = 'Completed' returns 0 rows but you know completed orders exist. Most likely cause?
- A. The table is empty
- B. Case or whitespace mismatch in the stored values
- C. SQL cannot compare strings
- D. You need an index
5. You add LIMIT 100 while exploring. What must you remember before reporting a total?
- A. Nothing, LIMIT does not affect aggregates
- B. Remove it - an aggregate over a limited set is not the real total
- C. Increase it to 1000
- D. LIMIT only affects ORDER BY
---
Answer Key and Explanations
Check these only after attempting every question.
1. B - Column order and set can change upstream, silently changing your result
Naming columns makes the query's contract explicit and stable when the schema changes.
2. B - Different rows between runs when values tie
Ties have no guaranteed order. Add a unique tie-breaker for reproducible results.
3. B - WHERE then SELECT then ORDER BY
Rows are filtered first, then columns are produced, then the result is ordered - which is why a SELECT alias may not be usable in WHERE.
4. B - Case or whitespace mismatch in the stored values
String comparison is usually exact. Inspect distinct values before assuming the filter is right.
5. B - Remove it - an aggregate over a limited set is not the real total
A limit applied while exploring silently truncates the population your aggregate describes.
Practical Check
Apply this module to your own work: complete the module activity for *SELECT, WHERE, ORDER BY, and LIMIT*, then write one sentence naming what your result shows and one naming what it does not.
Strong Answer Pattern
A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.
