PostgreSQL subqueries allow one SQL query to run inside another, making it possible to solve filtering, aggregation, ...
PostgreSQL CASE statements make it possible to add conditional logic directly into SQL queries, working similarly to IF ELSE ...