Subject | SQL Query Help |
---|---|
Author | Erik Raul Chan Silveira |
Post date | 2005-11-17T00:23:46Z |
Hello People:
(if this msg is a off topic, pardon me, point me to another list)
I would like your help with a query, I have the next data:
ProductID SaleDate (m/d/Y)
Pr1 05/05/2005
Pr1 06/01/2005
Pr2 01/01/2005
Pr2 10/15/2005
...
Pr1 10/29/2005
Pr2 10/16/2005
...
Pr3 10/01/2005
...
I wanna obtain a resulset with all products and its last (most recent)
SaleDate,
something like:
ProductID SaleDate
Pr1 10/29/2005
Pr2 10/16/2005
Pr3 10/01/2005
may i accomplish it with one (maybe complex) query or should I make a
stored procedure?
Please any advices.
Thanks in advance.
Erik
____
(if this msg is a off topic, pardon me, point me to another list)
I would like your help with a query, I have the next data:
ProductID SaleDate (m/d/Y)
Pr1 05/05/2005
Pr1 06/01/2005
Pr2 01/01/2005
Pr2 10/15/2005
...
Pr1 10/29/2005
Pr2 10/16/2005
...
Pr3 10/01/2005
...
I wanna obtain a resulset with all products and its last (most recent)
SaleDate,
something like:
ProductID SaleDate
Pr1 10/29/2005
Pr2 10/16/2005
Pr3 10/01/2005
may i accomplish it with one (maybe complex) query or should I make a
stored procedure?
Please any advices.
Thanks in advance.
Erik
____