/ Published in: SQL

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT c.FirstName, c.LastName, o.OrderDate, o.OrderAmount FROM Customers c JOIN Orders o ON o.CustomerId = c.CustomerId WHERE o.OrderDate = ( SELECT TOP(1) o1.OrderDate FROM Orders o1 WHERE o1.CustomerId = o.CustomerId ORDER BY o1.OrderDate DESC )
Comments
