Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

SQL

Learn how relational databases think and how to talk to them in SQL. You will create tables, add and change rows, summarise data with aggregates, and protect it with constraints — all on one small shop database.

Ready to learn6 sections · 23 lessons
Start learning

Course curriculum

Learn the Basics3 lessons

Meet tables, rows, columns and keys through a small shop database, weigh what relational systems are good and bad at, and see where NoSQL stores fit instead.

  1. What Is a Relational Database?12 min
  2. RDBMS Benefits and Limitations12 min
  3. SQL vs NoSQL Databases12 min
Basic SQL Syntax4 lessons

Learn how a statement is put together from keywords, pick sensible data types, combine conditions with operators, and ask your first real questions with SELECT.

  1. SQL Keywords and the Shape of a Statement12 min
  2. Data Types15 min
  3. Operators15 min
  4. SELECT — Asking for Data15 min
Data Definition Language (DDL)4 lessons

Build the shop's tables with CREATE TABLE, change them safely with ALTER TABLE, and learn exactly how TRUNCATE and DROP differ before you ever run them on real data.

  1. CREATE TABLE15 min
  2. ALTER TABLE15 min
  3. TRUNCATE TABLE12 min
  4. DROP TABLE12 min
Data Manipulation Language (DML)3 lessons

Put data into the shop with INSERT, change it with UPDATE and remove it with DELETE, using one habit — preview with SELECT first — that keeps every change deliberate.

  1. INSERT — Adding Rows15 min
  2. UPDATE — Changing Rows15 min
  3. DELETE — Removing Rows15 min
Aggregate Queries5 lessons

Count, total, average and find extremes with COUNT, SUM, AVG, MIN and MAX, then answer 'per customer' and 'more than' questions with GROUP BY and HAVING.

  1. COUNT — How Many?12 min
  2. SUM and AVG — Totals and Averages15 min
  3. MIN and MAX — Smallest and Largest12 min
  4. GROUP BY — One Answer per Group15 min
  5. HAVING — Filtering Groups15 min
Data Constraints4 lessons

Give every row an identity with primary keys, link tables safely with foreign keys, and write business rules into the schema with UNIQUE, NOT NULL and CHECK.

  1. Primary Key15 min
  2. Foreign Key15 min
  3. UNIQUE and NOT NULL12 min
  4. CHECK15 min