Sikau

Learn Databases and SQL

Query, design and change data with SQL — on real PostgreSQL.

Every app stores data. Learn SQL from your first SELECT to grouping, designing tables with constraints, relationships and JOINs, subqueries, indexes, transactions and safe queries — running on real PostgreSQL in your browser.

Intermediate · 17 lessons · about 9 hours · free

Start Databases and SQL free: run real code in your browserright here

Continue with Google

What you will learn

Unit 1: Querying

SELECT, filtering, sorting and summarising data.

  1. Day 1What is a database?Tables, rows, columns — and your first query.20 min
  2. Day 2Filtering with WHEREComparisons, AND / OR, IN, LIKE and NULL.30 min
  3. Day 3Sorting and shaping resultsORDER BY, LIMIT, DISTINCT, aliases and expressions.25 min
  4. Day 4Counting and groupingCOUNT, SUM, AVG, GROUP BY and HAVING.35 min
  5. Day 5Project: Menu reportFiltering, grouping and sorting together.30 min

Unit 2: Designing data

Tables, constraints, changing data, relationships and JOINs.

  1. Day 6Creating tablesData types, primary keys and constraints.35 min
  2. Day 7Changing dataINSERT, UPDATE, DELETE and RETURNING.30 min
  3. Day 8Relationships and foreign keysOne customer, many orders.30 min
  4. Day 9JOINsCombine tables in one query.35 min
  5. Day 10Many-to-manyJunction tables.30 min
  6. Day 11Good table designNormalisation: each fact in one place.30 min
  7. Day 12Project: Table bookingsDesign a schema and query it.45 min

Unit 3: Beyond the basics

Subqueries, indexes, transactions and safe queries from apps.

  1. Day 13Subqueries and CTEsQueries inside queries — readable with WITH.35 min
  2. Day 14Indexes and performanceFast lookups with indexes; read the plan with EXPLAIN.30 min
  3. Day 15TransactionsAll or nothing: BEGIN, COMMIT, ROLLBACK.30 min
  4. Day 16Safe queries from appsSQL injection and parameterised queries.25 min
  5. Day 17Capstone: Café analyticsCTEs, joins and aggregates for a real report.45 min

Before you start

These courses make Databases and SQL easier:

See all courses

Built with ❤️ by dibe.sh