Hands-on SQL practice exercises that follow along with the Amigoscode SQL courses. Work through them against your own local PostgreSQL database so you actually write and run the SQL.
| # | Course | Sections | Exercises |
|---|---|---|---|
| 01 | Up and Running with SQL | 2 | 27 + 6 bonus |
| 02 | SQL Fundamentals | 8 | 132 + 24 bonus |
| 03 | Database Design | 4 | 55 + 16 bonus |
| 04 | Advanced Databases | 20 | 288 + 60 bonus |
- Read
SETUP.mdonce to install PostgreSQL and create a practice database. - Pick a course, then a section inside it.
- Open the section's
exercises.mdand work through each question inpsql. - Some sections ship with a
schema.sql/seed.sql— load them first (instructions in the section README). - Stuck? Peek at
solutions/— but try on your own first.
sql-exercise/
├── README.md <- you are here
├── SETUP.md <- one-time Postgres setup
├── 01-up-and-running-with-sql/
│ ├── README.md
│ ├── 01-databases/
│ │ └── exercises.md
│ └── 02-working-with-tables/
│ ├── schema.sql (target schema for reference)
│ └── exercises.md
└── solutions/ <- will move to a `solutions` git branch later
└── 01-up-and-running-with-sql/
├── 01-databases/solutions.sql
└── 02-working-with-tables/solutions.sql
Solutions currently live in a top-level solutions/ directory so they're easy to find while this repo is still local. Once the repo is initialized with git, they will be moved onto a dedicated solutions branch and removed from main, so students can't accidentally stumble on answers.