Country or region and language

    Choose your country or region and your language.

    Suggested for you

      All countries and regions

        Choose your character

        It shows in the top bar and on your profile. Change it any time.

        Courses / Developer tools

        PostgreSQL tutorial and practice course

        Learn PostgreSQL by writing SQL against a database running in your browser. Start with tables and queries, then practice indexes, query plans, JSONB and access policies. Projects and case studies connect those skills to backend engineering work.

        Start lesson 1Practice interviewTake the assessmentPractice the first unit of every course. No account needed.
        61lessons
        338checked exercises
        14projects, cases and exams
        Prepares you for Backend and data engineering interviews and practical database job tests

        What you will be able to do

        • Design tables with PostgreSQL types, keys and constraints
        • Read EXPLAIN ANALYZE output and test indexes against a query
        • Query JSONB and build full-text search with suitable indexes
        • Use transactions, savepoints and simulated competing-session scenarios
        • Plan schema changes, partitioning and materialized views
        • Test functions, triggers, grants and row-level security

        Who it is for

        You are starting backend development
        Build a database schema and write queries before moving to framework-specific data access.
        You already know general SQL
        Practice PostgreSQL behavior that matters for an application: constraints, JSONB, plans and permissions.
        You are preparing for an engineering interview
        Explain the result and its edge cases, then test the SQL on changed data.

        What you can practice free

        Unit 1, Query foundations: 5 lessons and 24 checked exercises, with no account or card.

        Start the free unit

        The rest of the course opens with a One Course or All Access plan. See plans and prices

        Keep going in PostgreSQL for engineers

        Choose access here. Your course is already selected.

        One Course

        Every lesson, project and mock exam in PostgreSQL for engineers.

        Loading price/ month

        Billed monthly. Cancel any time.

        All Access

        Every course, exam and project, plus the Interview Hub.

        Loading price/ month

        Billed monthly. Cancel any time.

        Projects, case studies and mock exams

        Case study · BeginnerOrder audit

        Harbor Parts' controller needs an order-quality audit before a monthly close.

        6 steps · 45 min
        Project · IntermediateDispatch workload indexes

        Field Repair's service owner has supplied six access patterns for its dispatch queue.

        6 steps · 45 min
        Project · IntermediateSupport search service

        Signal Dispatch's support lead needs a searchable article interface and a separate event-tag lookup.

        6 steps · 45 min
        Project · IntermediateDispatch reporting interface

        Harbor Parts' dispatch manager wants a reusable report of open work with customer names, missing-amount flags and daily queue totals.

        6 steps · 45 min
        Case study · AdvancedSlow customer report

        Field Repair's controller received a customer report whose total changed after a performance rewrite.

        6 steps · 45 min
        Project · AdvancedTransfer ledger

        Signal Dispatch's finance engineer needs an atomic account transfer with a durable local ledger record.

        6 steps · 45 min
        Project · AdvancedCompatible status migration

        Harbor Parts is replacing its order status representation while old readers still depend on status.

        6 steps · 45 min
        Project · AdvancedRetained partition archive

        Field Repair needs January removed from its live event parent while retaining the January table for an audit.

        6 steps · 45 min
        Project · ExpertTenant access audit

        Signal Dispatch's service owner needs evidence that tenant-specific order reports can't read another tenant's rows.

        6 steps · 45 min
        Mock exam · ExpertTimed test: backend PostgreSQL

        Complete an original backend job-test set in 50 minutes.

        12 questions · 50 min
        Mock exam · ExpertTimed test: PostgreSQL operations

        Complete an original production-engineering set in 55 minutes.

        12 questions · 55 min

        Practice PostgreSQL through PGlite with original operating data. Start with queries, types, constraints and safe writes. Build indexes for a workload, query JSONB, search documents and publish live or materialized reports. Read real EXPLAIN ANALYZE plans, inspect statistics and tune filters without changing their meaning. Later units cover snapshots, locks, retries, compatible migrations, partition retention, database functions, triggers and tenant access. Nine projects and cases carry your SQL through a complete deliverable. Interviews at three levels and two timed job tests review the work. Two-session traces use a labeled deterministic model because the embedded engine has one connection. Backup, replication and pooling decisions state their operational limits.

        Beginner

        FreeNo account or card needed. Every lesson in this unit is yours to practice.

        Query foundations

        Read operational tables without changing their grain.

        5 lessons

        Schema design

        Choose PostgreSQL types and enforce a relational contract.

        5 lessons

        Reliable writes

        Change only intended rows and preserve atomic work.

        5 lessons

        Intermediate

        Workload indexes

        Build indexes that match filters and ordering.

        5 lessons

        Documents and search

        Query JSONB and publish searchable support articles.

        5 lessons

        Reporting interfaces

        Publish reusable reports without hiding stale results.

        5 lessons

        Advanced

        Query plans

        Read real plans and tune a report without changing its answer.

        5 lessons

        Concurrent work

        Reason about snapshots and prevent conflicting updates.

        5 lessons

        Safe schema changes

        Expand schemas and maintain date partitions with checked boundaries.

        5 lessons

        Expert

        Database programming

        Encapsulate calculations, audit changes and constrain access.

        5 lessons

        Recovery and service boundaries

        Choose recovery, replication and pooling strategies with explicit limits.

        5 lessons

        Backend assessments

        Defend PostgreSQL decisions and complete two timed job tests.

        6 lessons

        A database for an application

        A query can return the expected rows while the schema still permits broken records. Work through types and constraints first, then check how inserts, updates and transactions behave when a required value is missing or two requests compete for the same row.

        Use the exercise guide for an original runnable example. Keep the SQL cheat sheet beside you for syntax, or review interview questions when you need to explain a decision aloud.

        Queries and operations

        EXPLAIN ANALYZE executes a query and reports its plan. Browser timing is useful for understanding that plan, but it is not a benchmark for a production server. The index workload project asks you to connect an index choice to the query it serves.

        For general SQL patterns, continue with SQL. Pair the database work with Java or Python engineering when your next task is application code.

        Common questions

        Do I need to install PostgreSQL?

        No. SQL exercises run in PGlite, a WebAssembly build of PostgreSQL, inside your browser. You use original fictional data.

        Are competing sessions real database connections?

        PGlite has one connection. Isolation and locking exercises use a labeled session simulator. It models the taught transaction schedules; it does not run a production database cluster.

        Does the course run backups and replication?

        Backup, replication and pooling lessons teach operational decisions with checked scenarios. They do not create server replicas, run an external backup utility or open a production connection pool.

        Is this an official certification course?

        Our assessments use original questions and do not award an EDB or PostgreSQL credential. Read the certification guide before choosing an external exam.

        What is free?

        The first unit is free. Access to later units follows the plan shown on the pricing page.

        Your Work Gym account

        Save your progress and pick up on another device. Your browser's progress comes with you.

        or

        You can keep practicing without an account.

        Change your plan

        Checking the price

        Help and feedback

        Ask a question, tell us what is not working, or share an idea. We reply by email.

        What is it about?

        We use it only to reply to you.