Master the SQL SELECT statement part 07: WITH and Common Table Expressions (CTE's)

Опубликовано: 31 Март 2025
на канале: Michael Fudge
3,874
98

This video is part of a multi-part series on mastering the SQL SELECT statement. The SELECT statement, the most often used SQL command, is easy to learn yet difficult to master. Follow along with me and level up your database query super powers!

This video covers the WITH clause and common table expressions. We use the WITH clause to name query results so that they can be re-used as part of a larger query. The named results are temporary and only existing within the execution scope of the query. This allows us to break down complex queries into multiple select statements yet return a single result in the process. This is extremely beneficial when writing sub-queries!

The SQL code is available here: https://github.com/mafudge/learn-data...

If you need to setup your own database environment, check out learn-databases! The easy way to get going and follow along with these videos.    • Learn Databases Walkthrough  

This video is part of the textbook Applied Database Management https://applieddb.com

Here's the entire playlist:    • Applied Database Management with SQL