Subqueries vs Joins when selecting across a many-to-many relationship in Postgres

When querying data across multiple related tables, Postgres offers a few options. In this video, Jon Meyers steps through how to write a subquery in a select statement, and then how to refactor this to use joins instead. Lastly, he demonstrates how to aggregate data across a many-to-many relationship. Querying Joins and Nested tables: https://supabase.com/docs/guides/data... 00:00 Warm up: Create a schema containing a many-to-many relationship 04:55 Exercise 1: Select data across tables using nested subqueries 08:10 Exercise 2: Refactor select to use joins instead of nested subqueries 11:42 Exercise 3: Aggregating data across a many-to-many relationship šŸ’» Videos to watch next: ā–¶ Everything you NEED TO KNOW about Relationships:    • EverythingĀ youĀ NEEDĀ TOĀ KNOWĀ aboutĀ Relation...Ā Ā  ā–¶ Get better at Postgres with these drills:    • 13minĀ HighĀ IntensityĀ PostgresĀ WorkoutĀ (NOĀ ...Ā Ā  ā–¶ Learn Postgres (playlist):    • LearnĀ PostgresĀ Ā  šŸ‘‡ Learn more about Supabase šŸ‘‡ šŸ•ø Website: https://supabase.com/ šŸ Get started: https://app.supabase.com/ šŸ“„ Docs: https://supabase.com/docs šŸ”” Subscribe for more tutorials and feature updates from Supabase: Ā Ā Ā /Ā @supabaseĀ Ā  šŸ“± Connect with Us: šŸ™ Github: https://www.github.com/supabase šŸ’¬ Discord: https://discord.supabase.com/ 🐦 Twitter: Ā Ā /Ā supabaseĀ Ā  ā–¶ Instagram (follow for memes): Ā Ā /Ā supabasecomĀ Ā  ABOUT SUPABASE: Supabase is the open source Firebase alternative. Supabase provides a full Postgres database for every project with pgvector, backups, realtime, and more. Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs. Build in a weekend, scale to millions. #Supabase #AppDevelopment #RealtimeApps #DeveloperTools

Aggregating Data WITHOUT AN ORM!
ā–¶ļøŽ

Aggregating Data WITHOUT AN ORM!

Everything you NEED TO KNOW about Relationships
ā–¶ļøŽ

Everything you NEED TO KNOW about Relationships

How Social Media Stores Your Data: SQL & Databases Explained Simply
ā–¶ļøŽ

How Social Media Stores Your Data: SQL & Databases Explained Simply

SQL Course for Beginners [Full Course]
ā–¶ļøŽ

SQL Course for Beginners [Full Course]

MySQL - The Basics // Learn SQL in 23 Easy Steps
ā–¶ļøŽ

MySQL - The Basics // Learn SQL in 23 Easy Steps

Watch this if everything feels too much (gentle comfort for tired women)
ā–¶ļøŽ

Watch this if everything feels too much (gentle comfort for tired women)

How to Correctly Define Many-To-Many Relationships in Database Design
ā–¶ļøŽ

How to Correctly Define Many-To-Many Relationships in Database Design

3 Hours of Creepy Minecraft Theories to Fall Asleep to
ā–¶ļøŽ

3 Hours of Creepy Minecraft Theories to Fall Asleep to

Are Multi-Column Indexes a good idea?
ā–¶ļøŽ

Are Multi-Column Indexes a good idea?

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) — 2.5 Hours
ā–¶ļøŽ

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) — 2.5 Hours

Advanced Row Level Security (RLS) Policies // Authorization Deep Dive
ā–¶ļøŽ

Advanced Row Level Security (RLS) Policies // Authorization Deep Dive

Postgres scales … when you do this!
ā–¶ļøŽ

Postgres scales … when you do this!

Simplify complex SQL queries with Views in Postgres
ā–¶ļøŽ

Simplify complex SQL queries with Views in Postgres

God Says:"I JUST CONFIRMED — ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message
ā–¶ļøŽ

God Says:"I JUST CONFIRMED — ONLY YOU CAN SEE THIS LETTER"/God Message Now/God Message

After My Wife Passed Away, My Daughter-in-Law Smiled At The Inheritance Meeting!! | Calm Dad Stories
ā–¶ļøŽ

After My Wife Passed Away, My Daughter-in-Law Smiled At The Inheritance Meeting!! | Calm Dad Stories

Usage-based restrictions for SaaS subscription tiers
ā–¶ļøŽ

Usage-based restrictions for SaaS subscription tiers

Vintage Screen Saver  | Screen Saver | Screensaver Flowers | Wallpaper Flowers | TV Wallpaper
ā–¶ļøŽ

Vintage Screen Saver | Screen Saver | Screensaver Flowers | Wallpaper Flowers | TV Wallpaper

SQL Server Tutorial - One-to-many and many-to-many table relationships
ā–¶ļøŽ

SQL Server Tutorial - One-to-many and many-to-many table relationships

Faster queries with index on JSONB columns in Postgres
ā–¶ļøŽ

Faster queries with index on JSONB columns in Postgres

3 reasons you should use Postgres Functions and Transactions
ā–¶ļøŽ

3 reasons you should use Postgres Functions and Transactions