I have these project
records:
---------------------------------
|id|name |rate |start_date|
---------------------------------
|1 |project A |90.0 |01-01-2017|
|2 |project B |100.0 |01-01-2018|
|3 |project A |95.0 |01-01-2018|
---------------------------------
I want all records, except when there are multiple records with the same name, in which case I only want the one with the most recent start_date
. In the example above, I want to get records 2 and 3.
How can I do that? So far I tried with distinct
, but without success.