Back to Browse

From Excel to SQL - Subqueries

70 views
Mar 1, 2024
21:28

Subqueries (and common table expressions) are among the most powerful SQL features which enable us to write truly awesome SQL. There isn't a corresponding Excel feature that is like subqueries (unless you know Power Query), so the content in this video might be hard to wrap your head around. If you're not comfortable with subqueries by the end of this, that's okay! Practise the SQL features that are most like Excel first, and return to this when you're more familiar with SQL. The dbfiddle website can be accessed for free and without an account at: - https://dbfiddle.uk/ Make sure to use the SQL Server dialect and the AdventureWorks sample database to be able to follow along with these examples! --------------------------------------------------- This is part of the From Excel to SQL playlist, available at: - https://www.youtube.com/playlist?list=PLEiRgvTilK5rhnVPQ_Tj3Q-CI0rGn_uiD Check out the previous video at: - https://youtu.be/OQSLOGelJv0 ...and the next video at: - https://youtu.be/8e4mQfEDJDk The written version of this content is also available at: - https://billwallis.github.io/sql-learning-materials/from-excel-to-sql/main-concepts/subqueries/ --------------------------------------------------- CHAPTERS 00:00 dbfiddle 00:28 Intro 02:05 Using subqueries in FROM 06:13 A better subquery example 11:16 Using subqueries in WHERE 14:35 Using subqueries in SELECT 15:51 Common Table Expressions (CTEs) 18:14 Multiple CTEs 19:21 Wrap Up

Download

0 formats

No download links available.

From Excel to SQL - Subqueries | NatokHD