I have a following table
-----------------------------------
Date | Prefilling | Ref
-----------------------------------
10/10/2017 | 5 | dinesh
17/10/2017 | 8 | Ajay
07/05/2017 | 5 | Aarthi
01/01/2018 | 8 | Kumar
-----------------------------------
How to perform order by and group by in same time? I am using following query but its not giving actual result
SELECT * FROM (
select * from table order by str_to_date(date,'%d/%m/%Y') DESC
) AS tmp_table group by Prefilling
and i am expecting the result, along with Ref
Array
(
[5] => 10/10/2017, dinesh
[8] => 01/01/2018, kumar
}