course

NL/EN
This training is available in Dutch and English.More information

PostgreSQL Querying: Advanced Techniques

Extend your SQL skills with advanced PostgreSQL techniques for real-world data problems.

January 7, 2027
-Veenendaal / Remote
2 days
1450 (excl. VAT)

Description

Go beyond SQL basics and learn advanced PostgreSQL querying patterns. You will compare multiple solution strategies and pick the best approach for each situation, applying table expressions, set operators, window functions, and JSON querying techniques along the way.

Learning Goals

CheckmarkConstruct views, derived tables, common table expressions, and set-returning functions to structure complex queries.
ApplyLogo InfoSupport
CheckmarkUse UNION, EXCEPT, and INTERSECT to combine and compare result sets.
ApplyLogo InfoSupport
CheckmarkImplement window functions with OVER, PARTITION BY, and frame clauses for ranking, offset, and aggregate calculations.
ApplyLogo InfoSupport
CheckmarkManipulate JSON, JSONB, and array data using PostgreSQL's native operators and functions.
ApplyLogo InfoSupport
CheckmarkInterpret PL/pgSQL blocks, variables, control flow, and function or procedure calls.
UnderstandLogo InfoSupport
For the above learning goals we use Bloom's Taxonomy

Prior Knowledge

See 'Prior Knowledge Courses' below.

Subjects

  1. Refresher
  2. Table Expressions
  3. Set Operators
  4. Window Ranking, Offset and Aggregate Functions
  5. JSON and Arrays
  6. Reading PL/pgSQL

Refresher

Refresher of the common pitfalls of basic SQL querying, ensuring everyone is on the same page before diving into advanced topics. Next to this, the module serves as an introduction to the database used in class.

  • Standard elements of a SELECT query
  • Joins
  • Grouping and Aggregating
  • Subqueries

Table Expressions

Table expressions are SQL elements that are not a physical table but can be used as if they were one.

  • Views
  • Set-returning Functions
  • Derived Tables
  • Common Table Expressions (CTE)
  • LATERAL joins
  • When to pick which option?

Set Operators

Set operators allow you to vertically combine and compare two similar result sets. This contrasts joins, where you combine data horizontally.

  • UNION (ALL)
  • EXCEPT / INTERSECT
  • Recursive CTEs, time permitting

Window Ranking, Offset and Aggregate Functions

Window functions are ideal for analytics scenarios like running totals and moving averages. They also allow you to look at previous or following values in your result set.

  • Window Functions
  • OVER
  • Frame
  • PARTITION BY
  • Conditional aggregation and the FILTER clause
  • Pivoting and multi-level aggregation, time permitting

JSON and Arrays

PostgreSQL has rich native support for semi-structured data.

  • JSON and JSONB operators
  • Querying with jsonpath
  • Building and aggregating JSON
  • Shredding JSON into rows
  • Building, unnesting, and aggregating arrays

Reading PL/pgSQL

You can use SQL for querying, but you will also encounter PL/pgSQL. What is this, why is this useful, what does the syntax look like, and how do functions and procedures fit in?

  • DO blocks
  • Variables
  • Basic control flow
  • Calling functions and procedures (SELECT vs CALL)
  • Exception handling and transactions

Schedule

Start dateDurationLocation
January 7, 2027January 8, 2027
2 days
Veenendaal / Remote
This is a hybrid training and can be followed remotely. More information
Veenendaal / Remote
This is a hybrid training and can be followed remotely. More information
Sign up

All courses can also be conducted within your organization as customized or incompany training.

Our training advisors are happy to help you provide personal advice or find Incompany training within your organization.

Prior knowledge courses

Follow-up courses

"Trainer who knows his profession!"
Marc
  • icon

    Hoge waardering

  • icon

    Praktijkgerichte trainingen

  • icon

    Gecertificeerde trainers

  • icon

    Eigen docenten