# wonderful-sql is a MySQL course whose reference answers are locked during study groups

> wonderful-sql is a Datawhale open source course that takes SQL from first principles to window functions and stored procedures, with chapter exercises, a job interview problem set, and course materials kept in the materials directory. The distinctive part is its study group mechanic, which hides the reference answers while a cohort is working.

**datawhalechina/wonderful-sql** — Follow me，从 0 到 1 掌握 SQL。

- Repository: https://github.com/datawhalechina/wonderful-sql
- Stars: 1,123 · Forks: 203
- Language: Unknown
- License: not declared
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/datawhalechina-wonderful-sql

## A course for people who need SQL at work, not a reference manual

wonderful-sql is a course, and the way it is designed tells you who it is for. The premise in the project's own description is that SQL has become an indispensable skill for many working people: data analysis, development and testing, product management and system maintenance all depend on it. The gap the project names is that school courses rarely cover its practical application systematically, which leaves people unprepared for interviews and for the job itself.

The content was assembled from several years of learning and practical experience, drawing on the classic content of a book called SQL Basic Tutorial and adding the team's frontline experience. The framing is that of the Datawhale open source community, and the stated aim is to help more people learn SQL efficiently and handle working requirements calmly.

That origin explains the structure. This is a reading-and-doing course, not a library and not a tool. The repository contains no source code at all: the top level is a set of Markdown chapter files, an img/ directory, a materials/ directory for the course related files, and a practice-questions/ directory.

The audience is a beginner or near beginner who needs a path rather than a reference, and a working developer who wants to fill a specific gap such as window functions. The database is MySQL, and the choice is explained: MySQL was selected to balance ease of use with reach, so the exercises run on the database most people can install locally. The outline and the exercises for each chapter are in the course directory, and the final part collects common SQL interview questions so that a learner who finishes the course is better prepared for interviews and for day to day work.

## The chapter order moves from SELECT to window functions

The syllabus is visible in the file names at the repository root, and the progression is a sensible one for someone starting from nothing.

Chapter zero is the environment: installing MySQL 8.0, and then connecting to MySQL and running SQL queries. Having the environment as chapter zero rather than as a README preamble is a deliberate choice, since a course that assumes you already have a database will lose people on their first evening.

Chapter one introduces databases and then introduces SQL itself. Chapter two covers basic queries and sorting, and it is the longest early chapter: the basics of the SELECT statement, arithmetic and comparison operators, logical operators, aggregate queries over a table, grouping a table, and specifying conditions on an aggregate result. That last item, the having style condition on grouped output, is where a beginner's model of SQL changes from filtering rows to filtering groups, so its placement in the fundamentals is right.

Chapter three moves to the harder queries: views, subqueries, the various kinds of functions, predicates, and the CASE expression. Chapter four is set operations, covering the add and subtract style combination of tables and joins.

Chapter five is the advanced material, and it is the part that separates this course from an introductory one: window functions, the different kinds of window function, an applied chapter on computing a moving average, the GROUPING operator, stored procedures and functions, and the PREPARE statement. A moving average worked through as an example is a good marker of the level, because it is the first thing many people need and the first thing they cannot write unaided.

The final chapter, ch06, is different in kind from the rest, and it is described as a decisive autumn recruitment chapter, which in context means a job interview problem set. Its exercises are labelled with difficulty, and the first two are finding the highest paid employee in each department and swapping seats, both marked medium. These are the kinds of questions that appear in interviews, and the chapter exists to convert the course into interview preparation.

## Reference answers are hosted outside the repository and hidden on purpose

The most unusual thing about this course is that the answers are not in the repository. Each chapter that has exercises links to a reference answers document hosted on an external document service, and the project states a rule for when those links work.

During team study periods, access to the reference answers is closed. Outside those periods they are open. The team study windows are described as roughly the last two weeks of each month, with the exact arrangement published in the Datawhale public account for that month's group study announcement. So the same URL alternates between usable and blocked depending on the calendar, and a learner working alone can read the answers whenever they want.

The reason is visible in the second special note. When a learner checks in for a task, they are expected to provide a link to an article summarising what they learned and their completed homework. For the final chapter, submitting the article link is mandatory, and a submission without one is treated as what the project calls a water check-in, meaning participation without real work.

That is a clever piece of community engineering, and it has consequences for anyone evaluating the repository as a resource rather than as a syllabus. The exercises are in the repository, but the worked answers are not, so a self learner outside a study window gets them, while someone inside one has to do the work. The check-in rule also means the pedagogical pressure comes from the group structure, not from the course text, which is why the text is usable on its own terms if you are not in a cohort.

One more practical note is that corrections are handled through issues and pull requests, and the project asks readers to report errata that they find.

## Getting the material and a MySQL instance to practise on

There is nothing to build. The course is Markdown, so the setup is a clone and a text editor. The project gives a specific way to download the repository, using Git Bash for a faster transfer:

```bash
git clone https://github.com/datawhalechina/wonderful-sql
```

After that you open the files with a Markdown tool, and the project names Typora as an example. There is no build step, no dependency install and no test suite, which is unusual for a repository and worth stating plainly so nobody goes looking for one.

For the database, chapter zero is the guide: install MySQL 8.0, then connect and run your first queries. A database client is the one tool that does need arranging, and the project points at Navicat Premium Lite, which has an open free subscription and a download page. Navicat is not required, it is simply the tool the authors use, but since the exercises are written against MySQL 8.0, that is the version to install.

The extra directories matter for practice. The materials/ directory holds the course related files, which in a course like this means the sample database and any datasets the exercises need, and practice-questions/ holds additional questions. Anyone starting from scratch should set up MySQL first, import the sample data, and only then work through the chapters, because the exercises assume a populated schema.

The images in the img/ directory are referenced from the chapter text, which is the usual arrangement for a course that walks through screenshots of a real database session.

## MySQL only, and a book as the backbone

Choosing MySQL as the single dialect is the project's clearest technical decision, and it cuts both ways.

What it gains is reach. MySQL installs on a laptop in a few minutes, and every exercise can be run locally by a learner who has never administered a database. A course that taught standard SQL and then said now install PostgreSQL as well would lose most of its audience at chapter zero. MySQL 8.0 as the baseline also means the window function material in chapter five is real rather than theoretical, since window functions arrived in MySQL 8.0.

What it costs is generality. The SQL taught here is MySQL SQL. A learner who later meets PostgreSQL or a different dialect will find that some of what they learned needs adjusting, and the course does not claim otherwise. For an interviewer assessing a candidate, MySQL syntax is the common case, so the choice is defensible for the stated goal of interview and work preparation.

The second structural choice is the book. The content is described as based on the classic material of SQL Basic Tutorial, with the team's own frontline experience folded in. That is a strength for coverage and a limitation for currency: a course built on a published book inherits that book's ordering and its coverage decisions, and a reader who notices a topic the book skipped will not find it here. The interview chapter and the materials directory are where the additions live.

There is also a translation cost for a non Chinese reader. The chapters are written in Chinese, and the terminology follows Chinese technical conventions, so an English speaking reader will be slower and will occasionally have to map a term onto its usual English equivalent.

## No licence stated, no releases, and content that stopped in August

Two governance facts are worth raising before anyone plans to reuse this material.

First, the repository does not state a licence. There is no LICENSE file in the top level listing, which holds the README, the seven chapter files, img/, materials/ and practice-questions/, and the licence field for the project is listed as unknown. The project describes itself as open source and says it is inspired by the Datawhale open source spirit, but an open source intention and a licence grant are different things, and without a licence file the default legal position is that reuse rights are not granted. If you intend to republish the text, translate it, or use it inside a paid course, that question needs an answer from the maintainers first.

Second, the maintenance picture. The repository is not archived, and the last push was on 2026-08-23, so the material is in reasonable shape and the community is still active, with issues and pull requests invited. There are no GitHub releases, which is normal for a course repository, since there is nothing to version. The primary language field is also recorded as unknown, which is a metadata artifact of a repository that contains only Markdown.

For a learner, none of this is a blocker: the material is readable, the exercises are runnable and the answers are available outside the study windows. For anyone building on top of it, the licence question is the one to settle first, and the exercise and answer structure is the second, since the answers are hosted on a third party document service rather than in the repository, which means they can change or disappear without a version history.

## Conclusion

wonderful-sql suits a self learner who wants a structured MySQL path with exercises and a job interview problem set, and it suits a study group that wants a shared syllabus with answers withheld during the working period. It is the wrong choice if you need an authoritative SQL reference, since it is a course written against MySQL 8.0 rather than a specification document, and a poor match if you intend to reuse the material commercially, because the repository states no licence. Before adopting, check the repository for a licence file, install MySQL 8.0 as the first chapter requires, and note that the reference answers are hosted on an external document service that is closed during team study periods.

## FAQ

### How do I download the wonderful-sql course material?

The project suggests using Git Bash and running git clone https://github.com/datawhalechina/wonderful-sql for a faster download, then opening the files with a Markdown tool such as Typora. The course related files are kept in the materials directory.

### Which database does the wonderful-sql course use?

The course is written against MySQL, and chapter zero covers installing MySQL 8.0 and then connecting to it and running SQL queries. MySQL was chosen to balance ease of use with how widely it can be reached.

### Why are the reference answers not available during team study?

Access to the reference answers is closed during team study periods, which run roughly over the last two weeks of each month, and open outside them. Learners are expected to submit a link to an article summarising their work when checking in, and in the final chapter that link is mandatory.

### What does the wonderful-sql course cover beyond basic queries?

Chapter three covers views, subqueries, functions, predicates and CASE expressions, chapter four covers set operations and joins, chapter five covers window functions including a moving average example, the GROUPING operator, stored procedures and PREPARE statements, and the final chapter is a job interview problem set with graded exercises.

## Sources

- [datawhalechina/wonderful-sql on GitHub](https://github.com/datawhalechina/wonderful-sql)
- [Issues](https://github.com/datawhalechina/wonderful-sql/issues)
- [README](https://github.com/datawhalechina/wonderful-sql/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/datawhalechina-wonderful-sql
