• Thanks guys. I will need to check with the app vender.

    It has come to light that I may be able to get what I am after by extracting from a second dataset (logs stock movements). The dataset in question lists ProductId multiple times with a date the stock moved (some products moved multiple times on the same day). How might I construct a query that returns the last 5 dates per product?

    The dataset in question has 200000 records (lots of repatition).

    I would name the table StockMovements and it would ahve 2 fields 'ProductId', 'DateMoved'.

    Many Thanks,

    Phil.

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper