Complex SQL Breakdown (CTEs, Subquery, and More)
HTML-код
- Опубликовано: 24 июл 2024
- 📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-...
🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql...
At some point in your SQL journey, you'll come across SQL queries that are more complicated - queries that are long, or contain things like Common Table Expressions, subqueries, and other features.
In this video, we'll start with a complex SQL query, and take small steps to understand what it is doing. We'll add comments along the way, and at the end we'll be able to understand what the whole query is doing.
⏱ TIMESTAMPS:
00:00 - Our complex query
01:37 - Formatting the query
03:22 - Base tables
05:58 - First subquery
08:24 - First CTE
09:53 - Subquery in second CTE
12:28 - The next subquery
15:04 - Second CTE
17:18 - Main query
🔗 VIDEO LINKS:
The query we start with in this video: github.com/bbrumm/databasesta...
Sample data for the query: github.com/bbrumm/databasesta... Наука
Absolutely brilliant, this is what I need wish I had found it early but thank God I finally found it.
Thanks, I’m glad you found it useful!
Your Explanation Always the best, Thank you Ben
Thanks!
Sorry, in the first place what was the query about? I mean, what was asked or requested to return/retrieve?
That's what this video explains - it's a query to show the standings or ladder for a football league.
Perfect ^__^
Thanks!
great videos as always
Thanks!