SQL is the language used to ask questions of data, and it is one of the most durable skills in software and analytics. Developers use it to build applications, analysts use it to answer business questions, and almost every reporting tool speaks it underneath. This course teaches SQL with PostgreSQL, a free, widely used open-source database, starting from your first SELECT and ending with a well-designed schema and real reports.

What you'll learn

  • How relational databases organise data into tables, rows and keys
  • Writing queries with SELECT, WHERE, ORDER BY and LIMIT
  • Joining tables: inner, left and self joins, and what each one returns
  • Grouping and aggregation with GROUP BY, HAVING and common functions
  • Subqueries and common table expressions (CTEs) for readable queries
  • Window functions for running totals, rankings and period-on-period comparisons
  • Designing tables with sensible data types, primary keys, foreign keys and constraints
  • Inserting, updating and deleting data safely with transactions
  • Indexes and reading EXPLAIN output to understand why a query is slow
  • PostgreSQL features worth knowing: JSONB, date handling, views and roles

Who it's for

  • Complete beginners to databases who want a solid foundation
  • Developers who rely on an ORM and want to understand the SQL it writes
  • Analysts and marketers who want to pull their own data instead of waiting for reports

Prerequisites

  • No programming experience needed
  • Comfortable with spreadsheets helps, since tables will feel familiar
  • PostgreSQL installed locally, run through Docker or used through a free hosted database

Outcomes

By the end of this course you will be able to:

  1. Write correct queries that join, filter and summarise data across several tables.
  2. Use CTEs and window functions to answer real reporting questions.
  3. Design a small, well-structured database with keys and constraints.
  4. Spot and fix common causes of slow queries.

Course outline

ModuleTopic
1Databases, tables and setting up PostgreSQL
2SELECT, filtering and sorting
3Joins and relationships between tables
4Aggregation with GROUP BY and HAVING
5Subqueries and common table expressions
6Window functions
7Dates, text and working with NULL
8Table design: data types, keys and constraints
9Inserting and changing data, and transactions
10Indexes and query performance
11Views, JSONB and other PostgreSQL features
12Project: build and report on a business database

FAQ

Why PostgreSQL rather than MySQL?

PostgreSQL is free, standards-friendly and has excellent support for analytics features such as window functions. Almost everything you learn applies to MySQL, SQL Server and other databases, and we point out the main differences.

Is this course for developers or analysts?

Both. The core SQL is the same. Developers can continue with a backend course such as Node.js and Express: Build REST APIs, and analysts with Data Analysis with Python and pandas.

Will AI tools make SQL unnecessary?

AI assistants can draft queries, but you still need to know whether the result is right. Understanding SQL is what lets you check and fix what they produce.

How do I join?

Get in touch and we'll share the current format, schedule and enrolment details.