I have a problem in designing query - to get list of customer price records
( last two date )
Here is sample table
Customer | Product Code | Price | Last Update
A | ItemA | 10,000 | 10/1/2007
A | ItemA | 11,000 | 10/6/2007
A | ItemA | 12,000 | 12/12/2007
A | ItemB | 10,000 | 11/1/2006
A | ItemB | 15,000 | 01/6/2006
A | ItemB | 12,000 | 01/8/2008
I Would like to get only two most current date for each item pricing
Result Expected :
Customer | Product Code | Price | Last Update
A | ItemA | 11,000 | 10/6/2007
A | ItemA | 12,000 | 12/12/2007
A | ItemB | 15,000 | 01/6/2006
A | ItemB | 12,000 | 01/8/2008
Anyone ?
Thanks
Regards
Michael