Skip to content
Quick reference

Cheatsheets

The condensed version of the reference: dense tables and one-line patterns you can scan in seconds. Examples use DuckDB SQL against the Garden Shop dataset, with notes where other databases differ.

Cheatsheets are for moments when you remember the concept but not the exact syntax. Keep them open while writing a query, reviewing a result, or translating a pattern from another SQL dialect.

Each sheet favors copyable patterns over long explanation. If a query is failing or the result looks wrong, jump from the cheatsheet into the related reference page or mistake guide for the reason behind the pattern.

Want the longer explanations? See the Reference section, or practice the patterns in the hands-on SQL lessons.

If you are not sure which syntax you need, begin with query basics, then move to joins or aggregates once the result needs columns from multiple tables or one row per group.