Query -- to return the LAST and the SECOND LAST value, thus I get

O

OTS

I have a table of 3 columns, the first one being ITEM, second column DATE,
third column SPEED.

Altogether I have 10 ITEMS in there --- lets say item A, B, C, D until J.

For each ITEM, the number of records is about 100 -- this make this table
consists of approximate 1000 lines/records.

And the number of RECORDS is still growing, mainly due to new DATE is being
entered sporadically. And new SPEED.

Now I am writing a query to return the LATEST Date for each item -- meaning
I am expecting to see 10 records.

For ITEM -- I need to group (TOTAL: GroupBy). Then DATE -- (TOTAL: Last) and
SPEED -- (TOTAL: Last).

Now, how am I going to write, for all ITEMS, a query to retun the SPEED
difference for the LAST DATE and the SECOND LAST DATE?

Thanks
 

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