How to pull the most recent order for each customer?
I have a db that is full of orders, along with the customers name, address, etc. There are multiple entries for each customer because they have purchased things more than once. I need to export a table that has all the customers and only their most recent order. I figure I can use the `id` field because they are unique and the highest `id` means the most recent.
I just need to filter out the most recently entered `id` along with the rest of the info in the fields all the way down the row for each customer.
The table is named orders and the id is just called `id`
Any ideas??