Should have used a better example. These literally produce the same results. It's opinionated which looks more complex. In my opinion, the derived table join is a more advanced technique so it looks more complex than just a basic select statement..
I understand what you mean, probably not the greatest example but this is also the most common use case for derived tables, apply some manipulation to a table then join to another table, if you can grasp that, derived tables are actually quite straightforward. They are table expressions alongside views, CTEs and inline table valued functions.
Do you prefer the GROUP BY or Derived Table approach?
Derived table definitely does the right job!
Derived Table
I'm new to learning SQL Server and TSQL and I love your videos. Please keep up the great lessons coming!
Thanks so much, always great to hear when people start learning.
Hi Breaded Dev can you make a video on what type of careers an SQL developer get into. Really like your content.
Excellent idea, I will upload one over the next couple of weeks.
I prefer JOIN
Yes but in some cases, joining to a table wouldn't get you to the solution which is why we need to use derived tables.
Should have used a better example. These literally produce the same results. It's opinionated which looks more complex. In my opinion, the derived table join is a more advanced technique so it looks more complex than just a basic select statement..
I understand what you mean, probably not the greatest example but this is also the most common use case for derived tables, apply some manipulation to a table then join to another table, if you can grasp that, derived tables are actually quite straightforward. They are table expressions alongside views, CTEs and inline table valued functions.