Skip to content
10,000 Seconds
← All journeys
Coding & web

Learn SQL basics to answer questions from data

Six half-hour sessions using SQLBolt's free interactive lessons and a real SQLite database that runs in your browser. You'll build a small coffee shop database and finish by answering ten business questions with your own queries.

Outcome

A file of ten working SQL queries that use SELECT, WHERE, ORDER BY, LIMIT, COUNT, SUM, GROUP BY, and HAVING, each answering a plain-English question correctly.

10,000 sec · 2:46:406 × 27 min 47 sec
  • Every resource is a real public page our team picked. Our server checks the links; if one ever breaks, tell us and we'll replace it.
  • This journey uses SQLite. Other databases (PostgreSQL, MySQL, SQL Server) use the same core SQL, but some details differ, such as LIMIT being TOP in SQL Server.
  • SQLite Fiddle keeps data only until you reload the page. Keep setup.sql and answers.sql saved on your computer.
  • SQLite Fiddle is hosted by the SQLite project but labeled as not officially supported, so its layout may change.
  • 10,000 seconds is a structured starting point. It builds a real first result, not guaranteed expertise.

Outline

  1. 1

    Build a sample database in your browser

    A 15-row orders table exists in SQLite Fiddle and you can count its rows.

    27:47
  2. 2

    SELECT: pick the columns you want

    Pull specific columns, calculate a new column, and list unique values.

    27:47
  3. 3

    WHERE: filter to the rows that matter

    Filter rows by number, text, date range, a list, and a pattern.

    27:47
  4. 4

    ORDER BY and LIMIT: sort and take the top

    Sort results and pull the top rows.

    27:47
  5. 5

    Totals and groups: COUNT, SUM, GROUP BY

    Total, count, and average data, and break totals down by group.

    27:46
  6. 6

    Capstone: answer ten business questions

    Ten working queries that filter, sort, group, and total the sample data, each answering a real question.

    27:46

Capstone

Ten questions, ten queries

A saved SQL file that answers ten plain-English questions about the sample coffee shop data, using filters, sorting, grouping, and totals, with every answer checked.

Sources