The SEMI and ANTI joins are great for filtering data based on the existence of data in another table.
Confusingly, SEMI and ANTI joins aren't really "joins". There's a traditional way of implementing SEMI/ANTI joins that all databases will support, and a few databases (like DuckDB!) actually provide SEMI/ANTI join types to make the SQL a little more friendly.
https://duckdb.org/docs/sql/query_syn...
---------------------------------------------------
This is part of the Everything About Joins playlist, available at:
• Everything about joins
The written version of this content is also available at:
https://billwallis.github.io/sql-lear...
---------------------------------------------------
CHAPTERS
00:00 Intro
01:12 Sample data
01:48 Problem statement
02:14 Filtering with WHERE ... IN
03:50 Filtering with WHERE EXISTS
07:19 DuckDB Syntax
10:35 Wrap up