I need to contruct a query that returns just one record for each customer (that has made a purchase) with the date of their last purchase.
So I have a transaction table with the customer ID so from this table I need to return just the most recent instance of each Customer ID along with the transaction date. I'll then join this to the customer table to get names and stuff.
The query is used for a report which then filters the date range of the transactions.
What is the fastest method to return this data set?