Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Practical SQL with PostgreSQL: From Queries to Real Projects

Practical SQL with PostgreSQL: From Queries to Real Projects

Build SQL skills with joins, analytics, indexes, JSON, PL/pgSQL, triggers and practical database labs
Last updated 11/2026
English

What you'll learn

  • Write and run PostgreSQL queries to select, filter, sort and transform data.
  • Design related tables using data types, primary and foreign keys, constraints and defaults.
  • Combine tables with joins and set operations while checking for missing matches and duplicate rows.
  • Summarize and analyze data using aggregates, GROUP BY, window functions, subqueries and CTEs.
  • Change data with INSERT, UPDATE and DELETE, and use transactions and savepoints to control changes.
  • Work with views, materialized views, JSONB, arrays and composite types.
  • Read execution plans and compare index choices and planner settings in repeatable exercises.
  • Create PL/pgSQL functions, procedures and triggers, then inspect how they behave.
  • Explore scheduling and optional query hints using separately configured PostgreSQL extensions.
  • Practice database roles, privileges, data exchange, backup and restore in a learning environment.

Course content

16 sections • 89 lectures • 6h 35m total length
  • Course Introduction and Preview2:14
  • Installing Docker Desktop5:20
  • Starting TrainingHub and Connecting to pgAdmin6:15
  • Navigating pgAdmin in Your Browser6:24
  • Reading a Schema and Running SQL6:15
  • Working with Scripts and Lesson Checkpoints5:08
  • Quick Check — Module 01

Requirements

  • No prior SQL or PostgreSQL experience is required. Basic computer and file navigation skills are helpful.
  • A computer capable of running Docker Desktop and Docker Compose, plus a web browser. Windows is used in the demonstrations.
  • Internet access to download course materials, container images and packages for selected extension labs.

Description

Build practical SQL skills with PostgreSQL, from your first queries to database programming, query performance and essential administration. Throughout the course, you will work with TrainingHub, a synthetic database for a training business, and learn to answer questions about courses, customers, enrollments and payments.

What you will learn:

  • Understand relational databases, tables and relationships; design tables using data types, primary and foreign keys, constraints and identity columns.

  • Write SELECT queries, filter and sort results, use aliases and expressions, and work with NULL, CASE, COALESCE, NULLIF, text functions, regular expressions, dates and timestamps.

  • Insert, update and delete data; use RETURNING, transactions and savepoints; compare DELETE, TRUNCATE and DROP.

  • Combine information with INNER, LEFT, RIGHT, FULL, CROSS and self joins, and understand missing matches and duplicate rows.

  • Analyze results with COUNT, SUM, AVG, MIN, MAX, GROUP BY and HAVING, while avoiding double counting in reports.

  • Build more complex queries with subqueries, EXISTS, common table expressions and set operations such as UNION, INTERSECT and EXCEPT.

  • Explore window functions, rankings, running totals, period comparisons, ROLLUP, CUBE and GROUPING SETS.

  • Create views and materialized views, query JSON and JSONB, and compare tables with arrays and composite types.

  • Read EXPLAIN and EXPLAIN ANALYZE plans, experiment with indexes and planner controls, and consider statistics and query performance.

  • Explore scheduling with pg_cron and optional query hints with pg_hint_plan in separately configured environments.

  • Introduce PL/pgSQL blocks, variables, functions, procedures, exceptions and triggers, then work with roles, privileges, data exchange, backup and restore.

The course combines explanations with demonstrations in pgAdmin, downloadable SQL materials, practical exercises, worked solutions and short knowledge checks. You can pause the lessons, run the examples and compare your results with the demonstrations.

Who this course is for: beginners building a foundation in SQL and PostgreSQL, and developers, analysts or testers who want to practice PostgreSQL features through examples.

To follow the demonstrated local setup, you will need a computer, a browser, Docker Desktop and Docker Compose. The setup demonstrations use Windows. Internet access is needed to obtain the environment and any required container images; some optional extension labs require additional setup. Setup on another operating system may require adapting the steps.

This course contains the use of artificial intelligence.

Some course materials and narration were created with AI assistance, including AI-generated speech.

Learn practical SQL and PostgreSQL by working with TrainingHub, a synthetic database for a training business. Use questions about courses, customers, enrollments and payments to practice reading, changing and explaining data.

Who this course is for:

  • Beginners who want a guided, practical introduction to SQL and relational databases.
  • Developers, data analysts and software testers who want to query and understand PostgreSQL databases.
  • People with some SQL experience who want practical exposure to PostgreSQL functions, query plans and database operations.