intermediate · No code

SQL and PostgreSQL Refresher

Refresh SQL and PostgreSQL fundamentals through a small realistic relational schema, covering querying, filtering, joins, aggregation, constraints, indexes, and transactions. Build confidence diagnosing incorrect results and composing reliable everyday relational queries.

What you'll be able to do

  • Write SELECT queries that retrieve chosen columns and filter rows with comparison and logical predicates.
  • Interpret how NULL affects comparisons, WHERE conditions, and SQL's three-valued logic.
  • Explain how foreign-key constraints preserve valid relationships between related tables.
  • Decide when a sequence of database changes should be committed or rolled back as one atomic transaction.
  • Diagnose incorrect query or database behavior by combining filtering, NULL semantics, referential integrity, and transaction reasoning.

Who this is for

This course is for learners who have encountered SQL before and want a focused PostgreSQL refresher rather than a first introduction. It fits anyone who wants to write everyday relational queries more confidently and diagnose mistakes involving filtering, NULL values, relationships, and transactions.

What you should already know

  • Some prior exposure to SQL SELECT statements and relational tables.
  • Basic familiarity with PostgreSQL or another SQL-based database.
  • Comfort reading simple tabular data and following multi-step instructions.

How a lesson actually goes

Lesson 1
TutorWelcome. We will begin with query structure: how a SELECT statement names the columns and table whose data you want to retrieve. Before we write one, what would you expect a query to need if you wanted the names and email addresses from a table called customers?
YouI think it needs SELECT and the table name. Maybe SELECT customers FROM customers, and then it would show the customer information.
TutorYou have the right keywords in mind, but SELECT is followed by the columns, while the table goes after FROM. So the targeted form is SELECT name, email FROM customers; it asks for two columns from that table rather than treating the table itself as a column.
YouSo SELECT chooses fields and FROM chooses where they come from. If I wanted every field, would I use SELECT * FROM customers?
TutorExactly. SELECT * retrieves every column, while naming columns explicitly makes the result more deliberate and easier to inspect. Let us use both forms on a small example and compare which information each result contains before we move on to filtering.

Written from this course's first lesson to show the format — not a recording of a real session.

Course content

marks each module's capstone lesson.

01Query Foundations4 lessons

Establish the foundations of relational querying by understanding basic query structure, selecting data from tables, and restricting results with predicates before combining these skills in a synthesis assessment.

  • Course Introduction

    Welcome and orientation to the SQL and PostgreSQL refresher. Review the learning path and how querying, filtering, joins, aggregation, constraints, indexes, transactions, and result diagnosis fit together.

  • Query Structure

    Learn the core structure of a SQL query using SELECT and FROM. Recognize how selected columns and the source table determine the shape of a result set.

  • Filtering Predicates

    Learn how WHERE evaluates each row against a condition. Practice comparison operators and logical combinations while distinguishing row filtering from column selection.

  • Query Foundations Synthesis

    Synthesize query structure and filtering predicates to reason about complete single-table queries. Diagnose incorrect results by tracing the selected columns, source table, and row conditions.

02Integrity and Synthesis4 lessons

Develop reliable reasoning about missing values, referential integrity, and atomic changes, then synthesize these concepts to diagnose and evaluate PostgreSQL operations.

  • NULL Semantics

    NULL represents an unknown or absent value rather than an ordinary value. Learn to predict when expressions involving NULL evaluate to TRUE, FALSE, or UNKNOWN and when IS NULL or IS NOT NULL is required.

  • Referential Integrity

    A foreign key restricts values in one table to valid referenced values in another table, preventing orphaned relationships. Learn how PostgreSQL enforces these rules during inserts, updates, and deletes.

  • Transaction Atomicity

    Atomicity ensures that the changes in a transaction are applied together or not applied at all. Learn how COMMIT and ROLLBACK preserve consistency when a multi-step operation succeeds or encounters an error.

  • Integrity Synthesis

    Evaluate multi-step database scenarios in which missing values, related rows, and transaction outcomes interact. Explain the resulting rows and database state, identify integrity violations, and determine whether changes should be committed or rolled back.

Questions

Is this a beginner SQL course?

It is a refresher, not a from-scratch introduction. You should recognize basic SQL and tables, while the course rebuilds confidence through guided practice with query structure, predicates, integrity, and transactions.

Will the course use PostgreSQL-specific material?

Yes. The examples use a small realistic relational schema in a PostgreSQL context, while the core query and relational concepts apply broadly to SQL databases.

What kinds of queries will I practice?

You will compose single-table SELECT queries, choose specific columns, apply comparison and logical filters, and evaluate whether the returned rows match the stated conditions.

Does the course cover NULL values and foreign keys?

Yes. You will reason about NULL through SQL's three-valued logic and explain how foreign-key constraints prevent invalid relationships between related tables.

Will I learn when to commit or roll back changes?

Yes. The course covers transaction atomicity and asks you to determine whether a sequence of database changes should succeed together or be rolled back as one unit.

The first lesson is ten minutes away.

Free while codeset is early. You choose what you're building before the first lesson starts, and the course is taught around it.

Start this course

Other courses