I have a table with customer purchase records, I would like to select only the last purchase from each customer. How to do this? I tried to use DISTINCT, but I have other data I need and it is not possible to group such as date.
For example:
Customer A
Compra 1
Compra 2
Client B
Compra 1
Compra 2
Client C
Compra 1
Compra 2
Compra 3
The result should be:
Cliente A Compra 2
Cliente B Compra 2
Cliente C Compra 3