Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Course · Web DevelopmentFree

Select Star SQL

A free interactive book that teaches SQL by asking real questions of a real dataset, with a query box in every section. Five chapters cover single-row queries, aggregation, grouping and joins, ending with challenge questions; no sign-up and no ads.

GitHub stars

174

GitHub (zichongkao/selectstarsql) · Sept 2026

Format

Course

Topic

Web Development

Provider

Zi Chong Kao

Level

Beginner

Access

Free

What it is

Select Star SQL is an interactive online book by Zi Chong Kao. Instead of toy tables, it works through one real public dataset from start to finish and asks genuine questions of it, so each new piece of SQL is introduced because the analysis needs it. Every section has an editor where you run queries in the browser and check your answers.

It has five chapters: beginning with single-row operations (SELECT, WHERE, functions), then aggregations, then grouping and more complex aggregate questions, then joins and dates, and closing remarks with challenge questions. The prose is licensed CC BY-SA 4.0 and the code and data are public domain, and it has been translated into several languages (source: selectstarsql.com, as of 2026-09).

A note on the dataset

The dataset is about executions in the state of Texas, including the last statements of the people executed. It is handled seriously and respectfully, but some learners may find the subject difficult. If you would rather not work with it, SQLBolt covers similar ground with neutral data.

Is it worth your time?

Yes, especially if you learn better from a story than from drills. It teaches you to think about what question a query answers and to check whether the result makes sense, which many courses skip. It is short, a few hours for most people, and it complements a drill-based course rather than replacing one.

Prerequisites

None. It starts from SELECT. You only need a browser.

Free vs paid

Completely free, with no sign-up and no ads.

What it does not cover

It is focused on querying: there is nothing on schema design, changing data, transactions or performance, and it does not teach a specific database's dialect. The in-browser engine is not PostgreSQL, MySQL or SQL Server, so small syntax details can differ from your database.

How to use it well

  • Try each question yourself before reading the explanation below it.
  • Rerun the key queries on your own database afterwards and note any syntax differences.
  • Do the challenge questions at the end without looking back.

Common questions

How long does it take? Most people finish it in one or two sittings of a few hours.

Is it enough to learn SQL? It is a good start for querying. You still need practice sets, and later stages such as schema design and indexes.

sqlfree coursebeginner friendlyopen source

Ready to start?

Opens on Zi Chong Kao in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Select Star SQL". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.