I have this table:
id_category | id_service | amount | date
This table have more than one rows with same id_category and id_service. How I can get only row from same id_category and id_service with the max date of them?
Example data:
1 | 1 | 0.1 | 2015-05-05
1 | 1 | 0.12 | 2015-05-06
1 | 2 | 0.2 | 2015-05-04
1 | 2 | 0.25 | 2015-05-05
1 | 2 | 0.30 | 2015-05-06
2 | 1 | 0.15 | 2015-05-05
I want to get this results:
1 | 1 | 0.12 | 2015-05-06
1 | 2 | 0.30 | 2015-05-06
2 | 1 | 0.15 | 2015-05-05
Thanks!