Yes PHV, I got something like this, thank you.
SELECT od.ItemNumber, o.InvoiceDate, od.UnitPrice
FROM Orders o
INNER JOIN OrderDetails od
ON o.OrderNumber = od.OrderHeaderNumber
INNER JOIN Customers c
ON o.CustomerCode = c.CustomerCode
INNER JOIN
(--==== Derived table "d" finds...
which table is ClientOrderDate in?
ItemNumber comes from the Products table.
ClientOrderDate comes from the Orders table.
UnitPrice comes from the OrderDetails table.
OrderType comes from the Orders table.
CustomerCode comes from the Orders table.
why would OrderDetails have multiple prices...
Hi, I have a database of products, orders and order details. I am trying to write a query that returns the most recent unit prices.
This means that I need to see each item that has been sold, and it's most recent price sold. This is what I wrote so far:
SELECT ItemNumber, Max(ClientOrderDate)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.