Course / 13

SQL

Express a question about tables as a query and explain every row of its result: selection, joins, aggregation and windows, then changes, transactions and SQL from Python.

Start without programming experience. The data-engineering route places basic Python first, but SQL can be read independently. Examples use PostgreSQL syntax. Python is needed only for the closing connection to a program; recursive CTEs are optional depth.

  1. Reading Tables
  2. Combining Rows
  3. Structuring Queries
  4. Changing Data
  5. Python and SQL
  1. 01

    Reading Tables

    From a row with a defined meaning to a predictable query result.

    After this section: Explain selection, projection, NULL, duplicates and ordering on a small table.

    4 of 4 notes published
  2. 02

    Combining Rows

    Group rows and combine tables while keeping track of multiplicity.

    After this section: Predict counts and sums after a join and explain missing or repeated rows.

    5 of 5 notes published
  3. 03

    Structuring Queries

    Compose queries and calculate over related rows without collapsing them.

    After this section: Explain a window frame, a time boundary and the intermediate results of a CTE.

    4 of 4 notes published
  4. 04

    Changing Data

    Define tables, change rows and group changes into one operation.

    After this section: Use constraints and conflict handling, and explain what commit or rollback changes.

    3 of 3 notes published
  5. 05

    Python and SQL

    Connect a program to a database without mixing query text with values.

    After this section: Explain parameters, result types, resource cleanup and transaction boundaries in a Python client.

    1 of 1 note published