MySQL ORDER BY or GROUP BY [duplicate]
问题 This question already has an answer here : MySQL SELECT and ORDER BY [closed] (1 answer) Closed 6 years ago . In relation to: MySQL ORDER BY Customized I have another question. We have an id_competitor with various scores. id_competitor score 1 WIN 2 50+ 3 90+ 4 90+ 1 50 2 WIN 3 40 4 40+ I would like to use order by but in the following order: id_competitor 2 1 4 3 I dont know how i should do it, with SELECT DISTINCT with ORDER BY or GROUP BY 回答1: based on other answer, I would do something