List:General Discussion« Previous MessageNext Message »
From:Gautam Gopalakrishnan Date:November 29 2008 10:14pm
Subject:Re: How to find last price of items that were sold?
View as plain text  
mos wrote:
> The Details table has Product_Code: Char(20), Date_Sold: Date,  and 
> Price_Sold: Double. The products are sold for different prices during 
> the month and I need to retrieve the last price it was sold for.


select product_code, price_sold,  max(date_sold)
from details group by product_code;

Regards
Gautam
Thread
How to find last price of items that were sold?mos29 Nov
  • Re: How to find last price of items that were sold?Gautam Gopalakrishnan29 Nov
    • Re: How to find last price of items that were sold?mos30 Nov
  • Re: How to find last price of items that were sold?Peter Brawley30 Nov