189-4 Intermediate Joins in SQL - Multiple Joins with Subqueries exercis


In this particular exercise, why do we need subquery?
If I do a join like below, shouldn’t that also work?

from invoice_line il 
inner join track t on il.track_id = t.track_id 
inner join album al on t.album_id = al.album_id
inner join artist ar on al.artist_id = ar.artist_id

I get a timeout, but how does it make a difference whether I do 4 joins together, or do 1 join with a subquery that has 3 joins?

Could someone update on this?


Hey, Kunal.

Can you please be more precise in your question?

One issue I see is that you didn’t provide a complete query. Queries do not start with FROM. Please make it easy for people to help you by phrasing your question as best as you can.

I will format your question to help you out, but you need to do the rest.