Why is wrong,my local mysql have no problem?


  • 0
    C

    set @a=0;
    select
    tt1.Score,tt2.Rank
    FROM
    (
    select * from Scores order by Score desc
    ) tt1
    left join
    (
    select t1.Score,@a:=@a+1 as Rank from(
    select Score from Scores group by Score order by Score desc
    ) t1
    ) tt2
    on tt1.Score=tt2.Score


  • 0
    R

    I came into the same situation. Anyone who got why?


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.