Save this video free

5 - Queries with SQL (1/4) - Information Systems for Engineers - ETH Zurich - Fall 2026

Ghislain Fourny's lectures · 44:01 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Ghislain Fourny introduces practical SQL querying in PostgreSQL by mapping relational-algebra operations to SQL clauses: SELECT projects columns, WHERE filters rows, and AS renames output attributes. He explains default bag semantics and DISTINCT, query plans, SQL expressions and three-valued logic for NULL, then applies these ideas in a query-identification exercise and demonstrates date-casting syntax.

Key takeaways

Chapters

0:00 SQL’s Role and the Relational-Algebra Operations It Implements
5:48 SELECT, Projection, and PostgreSQL’s Default Bag Semantics
13:33 How PostgreSQL Builds a Relational-Algebra Query Plan
17:49 Rename Columns with AS and Filter Rows with WHERE
23:41 SQL Predicates, NULL, and Three-Valued Logic
31:53 Arithmetic, Functions, and PostgreSQL Expression Tools
35:02 Identify a Query from Its Output Using Filters and Renaming
40:24 Cast Dates and Read SQL Case Conventions

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 Welcome back everybody. So, now we have again a practical lecture. So, I think it's probably where the fun actually starts now because um this is where we really get to practically querying tables in SQL interactively in the notebook and this is the part where you can really yourself >> [snorts] >> uh try out things and and experiments and make yourself familiar with the SQL language. Super important, the SQL language is absolutely everywhere. Uh it's it's very very widespread. All products uh dealing with relational tables implement it. It's undisputed. There's not even any competitor to SQL. This is the language for querying tables. So, having the expertise to

0:47 write SQL is very useful even in the age of LLMs. Uh uh the fact that SQL is so compact and and and uh text makes it very easy to an LLM, uh Claude, Codex, ChatGPT, Copilot to to output SQL. Uh so, it's also very complementary to to uh um to agents or generative AI. All right. In fact, it costs less tokens to use SQL than to do the same thing with Python, for example. >> [snorts] >> All right. So, where are we? We saw data definition, data definition language, uh what to do at the level of the table, the columns, the types, uh domains and so on, primary keys, foreign keys, constraints and so on.

1:35 We already covered how to create tables in SQL, how to drop tables even including the trick with if exists in order not to get an error if it's already there. Uh very useful for initialization scripts. We can rename tables, we can add columns, we can remove columns, we can rename columns. Uh we can do all of that um >> [clears throat] >> in the uh in the in SQL. And that we've

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Ghislain Fourny's lectures.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.