I have a following table.
id name data
1 DAN xxxxxxxxx
2 ANTONY xxxxxxxxx
3 DAN xxxxxxxxx
4 DAN xxxxxxxxx
5 JOSEPH xxxxxxxxx
6 ANTONY xxxxxxxxx
7 JOSEPH xxxxxxxxx
I want to first sort the table using ID and then group by name. eg.
7 JOSEPH xxxxxxxxx
5 JOSEPH xxxxxxxxx
6 ANTONY xxxxxxxxx
2 ANTONY xxxxxxxxx
4 DAN xxxxxxxxx
3 DAN xxxxxxxxx
1 DAN xxxxxxxxx
I tried various combinations of ORDER BY and also tried ORDER BY FIELD but unable to get the desired result
select * from table order by id,name?