Order and group by date in Mysql
- by Alexd2
Hi all and thanks in advance.
I have a small problem which can not resolve, I have this table, and I want to sort by date and group it (but I only show 1 per idCAT) 
| id | idcat | name |     date   |
| 1  | 3     | xx   | 2011-01-02 |
| 2  | 4     | xf   | 2011-01-02 |
| 3  | 3     | cd   | 2011-01-01 |
| 4  | 1     | cg   | 2011-01-04 |
| 5  | 4     | ce   | 2011-01-06 |
would like to stay that way, try in a way but I can not
| 2  | 4     | xf   | 2011-01-01 |
| 3  | 3     | cd   | 2011-01-02 |
| 4  | 1     | cg   | 2011-01-04 |