Home > database >  Mysql query scheduling problems
Mysql query scheduling problems

Time:10-05

I have known a scoring table tab_gameintegral
Mark fields to score but each ID at least three score
I want to find out the highest score each Id, and the entire table score arrangement according to drop further

CodePudding user response:

 
Select Max (score), ` Id ` from tab_gameintegral group by ` Id ` order by ` score ` desc

CodePudding user response:

With group by group statistics, this also is each ID list out, the biggest score, score less will not come,
 SELECT ID, 
MAX (SCORE) AS SCORE
The FROM tab_gameintegral
GROUP BY ID
The ORDER BY the SCORE.
  • Related