Summarize counts without hiding meaning
See this course’s project requirements
Answer whether one assigned workshop session can accommodate six additional bookings using your accumulated query collection.
Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.
What to include
- Include the complete original two-table fixture and dictionary.
- Show filtering, ordering and grouped summaries with expected results.
- Demonstrate both session-preserving and venue-preserving joins.
- Detect an invalid test record and record missing-data limits.
- Deliver the decision query with reproducible output and interpretation.
Review and revise
Use these criteria to check your work and choose what to improve.
- Question fit: row and group meanings match the decision.
- Query correctness: results follow from explicit SQL or accurate traces.
- Quality: totals reconcile and missing matches are explained.
- Reproducibility: fixture, queries and limits travel with the answer.
Want more background?
The idea in everyday life
Planning often needs totals by site instead of individual session rows. Aggregation compresses records, which is powerful but can hide mistakes about what was counted. A count of sessions is not a count of bookings. You will name both quantities, preserve the unassigned group and reconcile each summary with the original four-row fixture.
An aggregate summarizes several rows with a count, sum, or other calculation. With GROUP BY, each output row describes a group instead of one original record.
One step at a time.
Use the sample or information you have permission to use. Keep your work as you go. You can pause between steps.
- 1
Write the intended output unit: one row per site code. Decide to show session_count, total_seats and total_booked. These labels prevent a reader from mistaking session rows for people.
- 2
Use COUNT(*) for the number of rows and SUM for numeric quantities. Add GROUP BY site so the calculation restarts for each distinct site value, including the NULL group.
- 3
Calculate site A by hand from sessions 1 and 2. Then calculate B and the unassigned group. Keep missing venue information visible in your written explanation.
- 4
Reconcile grouped totals against a whole-table query without GROUP BY. Add all group capacities and bookings; if the totals disagree, inspect filters or duplicate records before using the answer.
- 5
Explain that a ratio of total_booked to total_seats measures seat utilization for these sessions only. Do not label it attendance or satisfaction, since neither was recorded in this dataset.
See how it works.
Fictional worked query:
SELECT site, COUNT(*) AS session_count,
SUM(seats) AS total_seats,
SUM(booked) AS total_booked
FROM sessions
GROUP BY site;Site A has two sessions, eighteen seats and fourteen bookings. Site B has one session, twelve seats and three bookings. The NULL group has one session, six seats and zero bookings. The overall checks are four sessions, 36 seats and 17 bookings. The query does not include site C because it starts from sessions and no session references C. Missing groups and zero-valued groups are therefore different facts.
Did you cover these?
- A totals 18 seats and 14 bookings.
- All groups sum to 36 seats and 17 bookings.
- Site C absence is explained.
What to finish
A grouped summary and independent whole-table reconciliation.
Watch for this
Calling COUNT(*) a participant count or averaging percentages without checking weights.
How can I tell I understand it?
Reconcile totals and explain what each aggregate counts.
Quick knowledge check
Answer all 3 questions. Get at least 2 right and the lesson completes automatically.
You’ll get an explanation for each answer. Signed in? Your results save to your account.
Pass the check. We’ll save the progress.
Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.
Go to the knowledge checkTools, templates, and lesson sources
Tools and templates
Tools open in a new tab so you can keep your place here.
Sources and further reading
Explore the references behind this lesson.
Source & access notes · checked 2026-09-10
Opened university OpenCourseWare overview; verified querying, relationships, design and optimization topics. Used as optional further study, with original fixtures here.
Access: Free OpenCourseWare reading and videos. External grading or progress services may require accounts; optional verified certificates have separate enrollment and may be paid. This course awards no Harvard credit or affiliation.
Reuse: Linked for reference. Examples, activities and assessments here are original; free access alone does not grant permission to reuse source text or branding.
Source & access notes · checked 2026-09-10
Opened official SELECT documentation covering WHERE, GROUP BY, joins, ORDER BY and NULL behavior. All supplied queries target SQLite syntax.
Access: Free public reading; no account or certificate is required for this Life Starter course.
Reuse: Linked for reference. Examples, activities and assessments here are original; free access alone does not grant permission to reuse source text or branding.
Report a problem with this lesson
Tell us what went wrong. Please leave out personal information and private project contents.