A hands-on SQL course for developers. Work through 15 chapters covering querying, schema design, joins, aggregations, window functions, transactions, and performance — all in the browser with instant feedback.
Get oriented with SQL and relational databases. Learn what a database is, how relational databases differ from NoSQL, and write your first SELECT queries.
Learn how to define database structures using CREATE TABLE, ALTER TABLE, and DROP TABLE. Covers data types, column definitions, and writing forward and rollback migrations.
Enforce data quality at the database level using NOT NULL, DEFAULT, PRIMARY KEY, UNIQUE, CHECK, and FOREIGN KEY constraints — so your application never has to.
Master the four fundamental database operations: INSERT, SELECT, UPDATE, and DELETE. Learn batch inserts, safe deletion practices, the RETURNING clause, and how CRUD maps to HTTP.
Filter and search data with precision using comparison operators, AND, OR, BETWEEN, IN, NOT, and LIKE pattern matching. Build compound filters across multiple conditions.
Control what your queries return using column aliases, ORDER BY, LIMIT, OFFSET, DISTINCT, and CASE expressions. Build top-N queries and implement pagination.
Transform data inside your queries using string functions, numeric functions, date arithmetic, COALESCE, NULLIF, and type casting — without touching your application code.
Summarise datasets with COUNT, SUM, AVG, MIN, and MAX. Learn how GROUP BY, HAVING, and COUNT(DISTINCT ...) work together to power analytics and reporting queries.
Combine data from multiple tables using INNER JOIN, LEFT JOIN, self joins, and multi-table joins. Learn table aliases, column qualification, and how to aggregate across joined results.
Write advanced queries using scalar subqueries, IN, EXISTS, derived tables, and Common Table Expressions (CTEs). Learn when to use each approach for readable, maintainable SQL.
Combine result sets from multiple queries using UNION, UNION ALL, INTERSECT, and EXCEPT. Understand when each set operation is the right tool for the job.
Design databases that stay consistent as your application scales. Learn table relationships, 1NF through 3NF, junction tables, denormalization trade-offs, and production schema patterns.
Perform calculations across related rows without collapsing your result set. Master ROW_NUMBER, RANK, DENSE_RANK, PARTITION BY, LAG, LEAD, and running totals with SUM OVER.
Encapsulate complex queries as reusable views and guarantee data consistency with ACID transactions. Learn BEGIN, COMMIT, ROLLBACK, and when to use each.
Keep your database fast and safe in production. Learn how indexes work, when to use composite indexes, how to read EXPLAIN output, prevent SQL injection, and write upserts with ON CONFLICT.