# SQL Essentials Example code and exercises for the glibCode course **[SQL Essentials](https://glibcode.net/courses/sql-essentials/)** (Beginner, about 7 hours). Ask questions of real data: SELECT, JOIN, GROUP BY and window functions on a store's orders database. ## Lessons | # | Lesson | Code | | --- | --- | --- | | 1 | Tables, rows and SELECT | [`lessons/01-tables-rows-and-select`](lessons/01-tables-rows-and-select/) | | 2 | Filtering with WHERE | [`lessons/02-filtering-with-where`](lessons/02-filtering-with-where/) | | 3 | Sorting and LIMIT | [`lessons/03-sorting-and-limit`](lessons/03-sorting-and-limit/) | | 4 | JOINs explained with Venn diagrams (sort of) | [`lessons/04-joins-explained-with-venn-diagrams-sort`](lessons/04-joins-explained-with-venn-diagrams-sort/) | | 5 | GROUP BY and aggregates | [`lessons/05-group-by-and-aggregates`](lessons/05-group-by-and-aggregates/) | | 6 | Subqueries | [`lessons/06-subqueries`](lessons/06-subqueries/) | | 7 | Window functions | [`lessons/07-window-functions`](lessons/07-window-functions/) | | 8 | Indexes and why queries get slow | [`lessons/08-indexes-and-why-queries-get-slow`](lessons/08-indexes-and-why-queries-get-slow/) | ## Getting started ```sh git clone https://git.glibcode.net/glibcode/sql-essentials.git cd sql-essentials ``` SQLite 3. Create the database once with `setup/schema.sql` and `setup/seed.sql`. Questions? Ask in the course forum or write to help@glibcode.net. ## License The code is MIT licensed (see `LICENSE`). The lesson texts are © glibCode.