PostgreSQL

PostgreSQL Practice

Master PostgreSQL from your first query to production, with hands-on SQL, analytics, indexing, transactions, security, performance tuning and replication, all tested against a real database.

PostgreSQLPostgreSQL
Read the PostgreSQL overview
Module 1

Data Types & Table Design

Pick the column types that enforce the rules: exact money, whole counts, bounded text, instants, enumerated states, defaults and database-generated keys.

4

Invoice Amounts That Drift

easy1 / 2 solved

Times, Flags and States

easyNo attempts yet

Keys Nobody Has to Invent

easyNo attempts yet

Clinic Appointment Book

easyNo attempts yet
Module 2

Constraints & Keys

Make the database enforce the rules: primary and unique keys, foreign keys with the right delete behaviour, named NOT NULL and CHECK rules, and rolling a rule out over legacy data.

4

Duplicate Customers

easyNo attempts yet

Orphaned Order Lines

easyNo attempts yet

Impossible Values Accepted

easyNo attempts yet

Event Ticketing Schema

easyNo attempts yet
Module 3

Querying Fundamentals

Ask the database precise questions: range, list and pattern filters with grouped logic, null-aware predicates and fallbacks, stable ordering and paging, one row per group, and value banding.

4

Search That Ignores the Filters

easyNo attempts yet

The Missing Nulls

easyNo attempts yet

Pages Out of Order

easyNo attempts yet

Rental Listings Finder

easy0 / 1 solved
Module 4

Joins & Set Operations

Bring tables together without losing rows: inner, left and full outer joins through a junction table, self joins, anti-joins, cross joins, and reconciling two lists with set operations.

0

About this path

This path starts with the SQL foundations of PostgreSQL: data types and table design, constraints and keys, querying, and joins and set operations. It helps to know what tables and rows are, but no earlier PostgreSQL experience is needed. The joins module shows how to combine tables to answer questions a single table can't.

Frequently asked questions

4

What will I practice in this path?

4 modules: Data Types & Table Design, Constraints & Keys, Querying Fundamentals and Joins & Set Operations.

How many challenges are there, and how hard are they?

12 challenges, all easy.

What does this path run on?

Challenges run on PostgreSQL.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.