last price query

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
 
T

tina

Thank you
I have split into simplier queries as suggested on links and now I can get
it to work
Regards
Tina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top