MySQL Forums
Forum List  »  Newbie

Re: Sorting table and then look for ID
Posted by: Peter Brawley
Date: November 05, 2021 11:47AM

Select from it as a subquery ...

select ... 
from (
    Id, userName, totalScore,
    Row_Number() OVER w AS 'rank'
  FROM scoreboard_table 
  WINDOW w AS (ORDER BY totalScore DESC) 
) as x

Options: ReplyQuote

Written By
Re: Sorting table and then look for ID
November 05, 2021 11:47AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.