MySQL grouping, descending achieve

Claim 1., gender packet, then the amount of data in descending order, using, row_number () over (partitionrown by class order by score desc) as rank

- noted that generates rankings, if you want to get rid of, nested query on it.

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/alpha-cat/p/12094519.html