Beginner 8 lessons · free
SQL tutorial Query, join and summarise data.
SQL — talk to databases. Every lesson has a runnable example you can edit, key points, a practice task, a quiz and interview questions.
Start learning SQL
Not started
Lessons
What you'll learn
- 01SQL introductionDatabases, tables, rows and columns — and your first SELECT.
- 02SELECT & WHEREChoosing columns and filtering rows with WHERE, AND, OR, IN, BETWEEN and LIKE.
- 03ORDER BY, LIMIT & DISTINCTSorting results, taking the top rows and removing duplicates.
- 04Aggregates & GROUP BYCOUNT, SUM, AVG, MIN, MAX, grouping rows and filtering groups with HAVING.
- 05JOINsCombining tables with INNER JOIN and LEFT JOIN.
- 06INSERT, UPDATE & DELETEAdding, changing and removing rows safely.
- 07Creating tables & constraintsCREATE TABLE, data types, PRIMARY KEY, NOT NULL, UNIQUE, DEFAULT and FOREIGN KEY.
- 08Subqueries & CTEsQueries inside queries, and readable WITH clauses.