I am using SQL 2000 - and the Nortwind database - specifically the Order Details table and the Orders table. I am writing a correlated sub query that will display each country name and the order with the highest OrderID. So far this is what I have:
INNER JOIN (SELECT OrderID,
Group By ShipCountry) OrderDetails On Orders.OrderID = OrderDetails.OrderID
INNER JOIN Orders On Orders.ShipCountry = OrderDetails.Quantity
Order By Order Details.Quantity
This is the error I am receiving. Please show me the way that I can alphabetize each contry and withing show the highet ordered.
Server: Msg 1013, Level 15, State 1, Line 10
Tables or functions 'Orders' and 'Orders' have the same exposed names.
Use correlation names to distinguish them.