INTERACTIVE LECTURES
Understand database structure
Guided class activity · apply the ideas from the full SQL lessons.
Opening your saved work…
Sign in to save across devices → · Download your guest work before switching accounts.
Write a data dictionary and name uncertainty
Step 3 of 3 · Database: Northshore Coffee
READ & UNDERSTAND
A useful data dictionary explains a field’s meaning, units, allowed values, and missing-value policy—not just its SQL type. total_amount needs a currency and a definition of what is included.
Type declarations alone do not prove data quality. SQLite uses type affinity unless stricter features or constraints are in play. Requiredness and allowed ranges need explicit rules.
Document an assumption rather than silently converting it into a fact. A NULL calorie value and a zero-calorie item should remain distinguishable.
Worked example
SELECT id, name, calories FROM menu_items WHERE calories IS NULL ORDER BY id;
IS NULL identifies genuinely missing calorie values. It does not match rows whose calorie value is zero.
The result tells you which records need attention, not why the value is missing. Keep the reason for missingness as an open question unless the source documents it.
Your question
Return id and name for menu items with unknown calories, ordered by id.
Explain your evidence
Write a dictionary entry for calories: meaning, unit, and what NULL means. What remains unverified?
Try a query to unlock the worked-answer discussion.
Query results
Predict the result, then run your query.Predict the result, then run your query.
Read-only activity · One statement per run · First 200 rows displayed · Checks compare the complete bounded result, not just this preview.
Explore this query freely in the playground ↗Check the save status above. Account-saved work is available in My Progress. Explanations are for discussion, not automatically graded. No prerequisite locks.