Reviews to get you unstuck
Choose a single symptom, rebuild the prerequisite and check a variant before going back to the lesson where you got stuck.
Choose a single sticking point
Open the related review, solve its practice activity and explain the result. Then go back to your activity: its draft is still saved.
Filters: I don't understand why a row appears
Predict true, false or unknown. A NULL does not satisfy an ordinary comparison.
Filter rows with WHERE · Compare values in your filters
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Conditions: AND and OR keep different rows from the ones I expect
Group the alternatives and look for a row that meets only one part.
Combine conditions with AND, OR and NOT · Filter ranges and lists with BETWEEN and IN
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Missing values: comparing with NULL gives an empty output
Use IS NULL and IS NOT NULL to ask about absence or presence.
Work correctly with NULL values
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Aggregates: my count or average does not represent what I wanted
State the input unit and the output unit. Tell apart rows, values that are present, and units.
Summarise data with COUNT, SUM, AVG, MIN and MAX · Create per-group summaries with GROUP BY · Filter groups with HAVING
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Joins: the JOIN loses rows or multiplies a measure
Explain zero, one and several matches. Check where the filter on the right-hand table goes.
Connect tables with keys and relationships · Match rows with INNER JOIN · Keep all rows with LEFT JOIN · Combine tables and keep control of the result rows
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Subqueries: I don't know if I need one value or multiple rows
Choose a value or a list in basic subqueries, and existence with EXISTS. An uncorrelated subquery can be run on its own. A correlated one needs the outer reference: temporarily replace that reference with a known id to inspect it.
Answer questions with subqueries · Find matches with EXISTS · Break queries into steps with CTEs
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Window functions: I lose the detail or pick the wrong position
Check the partition, the ordering, the tiebreaker, and whether you filter before or after numbering.
Number rows with ROW_NUMBER · Add sums and averages with OVER · Practice: master window functions
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Changes: I do not know which rows will change or how to undo it
Select first, limit the change, check afterwards, and decide how to finish based on the situation.
Update rows with UPDATE · Delete rows with DELETE · Control changes with COMMIT and ROLLBACK
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.
Design: the table accepts a value it should reject
Test a valid case, a boundary and an invalid case for each rule.
Declare primary and foreign keys · Protect columns with constraints · Practice: design a table with rules and an index
Solve a variant and go backYou are ready to carry on when: the variant is correct and you can justify the decision without copying the explanation.