README.md
Lesson 4: JOINs explained with Venn diagrams (sort of)
This lesson covers jOINs explained with Venn diagrams (sort of). You'll read a short explanation, try three small exercises and finish with a quiz.
Full lesson: https://glibcode.net/courses/sql-essentials/lessons/4
Files
joins.sql: INNER and LEFT JOINs between customers and orders
Tip: Write the FROM and JOIN lines first, then SELECT: it matches how the database reads the query.
Tip: Count before you delete: run the same WHERE with
SELECT COUNT(*)first.
Tip:
.mode boxand.headers onin sqlite3 make results much easier to read.
Run it
sqlite3 shop.db < ../../setup/schema.sql
sqlite3 shop.db < ../../setup/seed.sql
sqlite3 shop.db < joins.sql
Exercises
See exercises.md. Ask in the forum once you've tried.