last price query

  • Thread starter Thread starter tina
  • Start date Start date
T

tina

Hi
I am trying to write query which will show last price paid for a component .
I have a table with multiple stock codes each with multiple dates for
purchase receipts and price paid. When I group and sort by stock code and
sort by date I don't get required result. I think this is because have to put
first or last in total for date. Am I doing this totally wrong?
example of data
stock code date price
yfp0225 01/04/08 0.25
yfp0225 01/05/08 0.50
yfp0225 01/06/08 0.50
yfp0225 01/07/08 0.55
yfq0001 05/05/08 1.25
yfq0001 25/07/08 1.30
what i would like as result of query is
yfp0225 01/07/08 0.55
yfq0001 25/07/08 1.30
thanks
Tina
 
Thank you
I have split into simplier queries as suggested on links and now I can get
it to work
Regards
Tina
 
Back
Top