This is a sample. The learner and answers are made up to show what a Scio proof page looks like.
Skills checked by Scio
Sample learner
Preparing for a data analyst role
SQL joins
Checked by Scio 28 Oct 2026Explains why a one-to-many join multiplies rows and how to fix the count.
See answerHide answer4 answers, graded on Scio's server
1 · Explain
CorrectExplain in your own words why joining orders to order_items can return more rows than there are orders.
Each order has several items, so the join produces one row per order-item pair. An order with three items appears three times. Counting rows after the join therefore counts items, not orders.
2 · Apply
CorrectA dashboard shows 1,240 orders last week, but the shop only had 412.
What is most likely wrong with the query, and how would you fix it?
The query counts rows after joining order_items. I would use COUNT(DISTINCT orders.id), or aggregate the items in a subquery first and join that result to orders, so each order is one row.
3 · Defend
Partly rightA colleague wants to fix the duplicates with SELECT DISTINCT * on the joined result.
Would you accept that fix? Defend your choice.
No. DISTINCT * only removes rows that are identical in every column, and item rows differ, so duplicates stay. It also hides the real problem. Aggregating before the join is clearer and correct.
Follow-up
CorrectYou said aggregating first is clearer. When would you still join first and aggregate after?
When I need columns from both tables in the same row, for example revenue per product category. Then I join first and group by the category, making sure the grain of the result is what I want.
Filtering with WHERE and HAVING
Checked by Scio 24 Oct 2026Chooses WHERE for row filters and HAVING for filters on aggregates, with reasons.
Mini project: a weekly sales report
Checked by Scio 30 Oct 2026Built a report of revenue per store and week, and defended the date boundaries used.
How checking works
Each topic is checked with three written questions (explain it, apply it to a new case, defend a choice) and one follow-up about the answer itself, graded on Scio's server against a private rubric. Learners choose whether their answers appear on their page.