SQLBeginner
SQL — Basics
Query a real database (SQLite) right in your browser: write SQL and run it.
13 chapters59 lessons121 challenges
Course curriculum
Chapter 1: SELECT and basic queries
- ▸SELECT and FROM
- ▸Filtering with WHERE
- ▸Sorting with ORDER BY
- ▸Aggregate functions
- ▸Grouping with GROUP BY
Chapter 2: Advanced filters (WHERE)
- ▸AND, OR and NOT
- ▸BETWEEN and IN
- ▸LIKE and patterns
- ▸IS NULL and DISTINCT
Chapter 3: JOIN: combining tables
- ▸Why JOINs exist
- ▸INNER JOIN
- ▸LEFT JOIN
- ▸Aliases and multiple joins
Chapter 4: Aggregation and grouping
- ▸Aggregate functions
- ▸GROUP BY
- ▸HAVING
- ▸Aggregates with JOIN
Chapter 5: Subqueries
- ▸What a subquery is
- ▸Subqueries with IN
- ▸EXISTS
- ▸Correlated subqueries
Chapter 6: Modifying data and tables
- ▸INSERT
- ▸UPDATE
- ▸DELETE
- ▸CREATE TABLE and constraints
Chapter 7: Set operations (UNION)
- ▸UNION and UNION ALL
- ▸INTERSECT
- ▸EXCEPT
- ▸Rules and ORDER BY
Chapter 8: CASE and conditional logic
- ▸CASE WHEN
- ▸CASE in SELECT and ORDER BY
- ▸COALESCE and NULLIF
- ▸Conditional aggregation
Chapter 9: Window functions
- ▸What a window function is
- ▸PARTITION BY
- ▸ROW_NUMBER, RANK, DENSE_RANK
- ▸Aggregates as windows
- ▸LAG and LEAD
- ▸The window frame
Chapter 10: CTEs and recursive queries
- ▸What a CTE is (WITH)
- ▸Multiple CTEs and readability
- ▸Recursive CTEs: the structure
- ▸Recursion: generating sequences
- ▸Recursion: hierarchies
Chapter 11: Indexes and performance
- ▸What an index is
- ▸When to use it (and the costs)
- ▸Reading the plan: EXPLAIN
- ▸Composite and covering indexes
- ▸Optimization patterns
Chapter 12: Transactions and integrity
- ▸What a transaction is
- ▸The ACID properties
- ▸ROLLBACK and SAVEPOINT
- ▸Referential integrity
- ▸Concurrency and isolation
Chapter 13: Views and triggers
- ▸What a view is
- ▸Views: uses and limits
- ▸What a trigger is
- ▸NEW, OLD and timing
- ▸Use cases and cautions
Ready to level up?
Create a free account and start now: earn XP on every challenge and climb the leaderboard.