The Life Starter
0 of 6 complete0%
Course Library · Lesson 3 of 6
Digital · Guided lesson

Summarize counts without hiding meaning

About 33 minutes · 8 reading + 25 practice and checks
Time includes reading, practice, and questions. Extra videos or further study are optional.
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.
Open the full course project
Want more background?
Before you begin

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.

The idea

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.

Try it

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. 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. 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. 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. 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. 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.

Example

See how it works.

Fictional worked query:

sql
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.

Check your work

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.
Your work

What to finish

A grouped summary and independent whole-table reconciliation.

Common mistake

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.

Try 3 questions

Quick knowledge check

Answer all 3 questions. Get at least 2 right and the lesson completes automatically.

Not yet passed

You’ll get an explanation for each answer. Signed in? Your results save to your account.

1A site has two sessions with booked counts 4 and 7. What are COUNT(*) and SUM(booked)?
2A group has 6 booked of 10 seats; another has 3 of 5. What is combined utilization?
3Grouped capacities sum to 44, but an overall SUM over the same intended source rows is 32. What is the appropriate next step?
0 of 3 answeredApply the lesson to a short question, then review the explanation.
3
Finish this lesson

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 check
Tools, 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.

Harvard CS50 — Introduction to Databases with SQL
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.

SQLite — SELECT reference
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.

No sign-in needed.