Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 select Query Question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-04 : 21:07:14
Abdul Hameed writes "Would you please like to help me ...

In MS SQL Server 7.0 Northwind Sample Database
there are three tables named Products, Orders & Order Details
I want to write a query which will result me "All the products alongwith
their LastSale Date, OrderNo, CustomerId" i.e.

ProductID ProductName LastSaleDate CustomerID OrderID

LastSaleDate means LastOrderDate

please reply to my e-mail address
Waiting for your reply



Regards

hsbilal@hotmail.com"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-03-05 : 15:20:43
Why does this sound like a homework question?

If it is, we can't really help you (we could give you the answer, but you won't learn anything). I'll give you a hint: Max() and GROUP BY. You can find these documented in Books Online and any book on SQL, and you'll be able to figure out the query from there.

Go to Top of Page
   

- Advertisement -