SQL Correlated Subqueries

preview_player
Показать описание
Demonstrates SQL correlated subqueries.
Рекомендации по теме
Комментарии
Автор

Loving these videos, your explanations are excellent!

User
Автор

why c.customerid and not o.customerid? are they both interchangeable?

xrwflmf
Автор

Can't you just use group by in the subquery?

jayjayf
Автор

Would below be the same?

SELECT c.ContactName, c.OrderDate,
(select Max(OrderDate) from orders o
where o.CustomerID = c.CustomerID) sq
from Customers c

marcinx
Автор

Is there a reason not to do

select ContactName, max(OrderDate)
from customers c join orders o
on c.CustomerID = o.CustomerID
group by c.CustomerID

?

cellobix