All courses/Digital

Course 86 · Digital course 11

Answer Questions with SQL

Use SQL to find answers in a small database and check that your results make sense.

Before you start

Prepare paper tables or an existing permitted SQLite environment.

See everything you’ll need

Can practice on paper · Downloadable files available · Optional SQLite or Python 3 for execution. Download the starter pack

What you’ll leave with

SQL queries that answer a practical question, with checked results and a clear explanation of what they mean.

Start course Start without an account. Sign in to save lesson progress across devices.

Your project

Start with the practice files. Build your project one lesson at a time.

Practice files are free without an account. Sign in to save your project record in My Proof: a description, checklist, and optional work link. Keep the original files in your own app or notebook; saving a project record does not upload them.

  1. Get your materialsDownload practice filesFictional database setup, ten reference queries, expected tables, a blank answer brief, and a runner using Python’s built-in SQLite.
  2. Make your projectView the project checklist Work in your own notebook, document, or software. Use the supplied practice examples when you prefer.
  3. Keep a private recordSave a project record Sign in to save a description and checklist, then return to update them.
Course handbook

Know the route before you begin.

Here’s what you’ll need and what you’ll make. You can return to this guide during any lesson.

Who this is for

Learners age 14 and older, including adults exploring technical work or strengthening school and community projects. No employment or university enrollment is needed.

Prepare before lesson one
  • Prepare paper tables or an existing permitted SQLite environment.
  • Use only the supplied fictional fixture in a fresh practice database.
  • Save your queries and predictions in a plain text note; no remote account is needed.
Your final project

Finish with proof you can use.

Answer whether one assigned workshop session can accommodate six additional bookings using your accumulated query collection.

Save a project record in My Proof
See project checklist and review criteria

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.
Three ideas to help you along the way
Three useful ideas

The rules behind the steps.

01

Define the row

Know what one record represents before counting it.

02

Check the join

Confirm keys, unmatched rows and possible duplication.

03

Explain the answer

Separate stored facts from decisions and unverified assumptions.

What do these words mean?
Key words

Key terms worth knowing.

Primary key
A field or combination of fields that uniquely identifies a row.
Query
A statement requesting a result from stored data.
NULL
A marker for missing or unknown data, distinct from zero.
Aggregate
A calculation summarizing multiple rows.
Join
An operation matching rows from related tables using a condition.
Your route

6 lessons.
One useful project.

Work in order the first time. Each lesson makes something the next lesson can use.

  1. 1
    Up next

    Build two tiny tables

    Identify rows, columns, and unique IDs. Prepare the supplied practice data, called a fixture.

  2. 2
    29 min

    Select, filter and order rows

    Write a query that answers a precise row-level question.

  3. 3
    33 min

    Summarize counts without hiding meaning

    Use SUM, COUNT and GROUP BY and reconcile the totals.

  4. 4
    38 min

    Join tables and preserve missing matches

    Choose an inner or left join based on the question.

  5. 5
    32 min

    Check data before trusting a query

    Create checks for invalid counts, missing assignments and duplicates.

  6. 6
    37 min

    Deliver a reproducible answer brief

    Connect a decision question to queries, checked results and limits.

Use the tools

Tools to help you practice.

See all tools
Source transparency

Sources and further study.

Explore the references behind the lessons and take your learning further. Source notes explain access and reuse.

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.

SQLite — CREATE TABLE reference
Source & access notes · checked 2026-09-10

Opened official table-definition documentation including keys and constraints. Tables use explicit primary keys and original nonpersonal test data.

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.

Ready when you are

Start with the first useful move.

You’ll always know what to do, what to make, and where to go next.

Start lesson one