I have a query that when executed gives me the result like this
speciaid | title | date
one | xxx | 2013-10-03 02:13:54
one | xxx | 2013-10-03 03:13:54
two | yyy | 2013-10-02 02:13:54
Now if I add GROUP BY specialid
, it gets grouped but the date i get is the old date and not the new date for the 'date' column like this
speciaid | title | date
one | xxx | 2013-10-03 02:13:54 // old date selected for entry one
two | yyy | 2013-10-02 02:13:54
and I want it like this
speciaid | title | date
one | xxx | 2013-10-03 03:13:54 // new date for entry one needed
two | yyy | 2013-10-02 02:13:54
I have tried many group by's - I get the same result. I would appreciate it very much if someone help with the group by statement for query.