diff --git a/jtserv/jtserv.rb b/jtserv/jtserv.rb index 529cf16..b99f990 100755 --- a/jtserv/jtserv.rb +++ b/jtserv/jtserv.rb @@ -310,9 +310,9 @@ end def ranking(text) @db.execute(<<~EOF, text) - SELECT user, max(score), max(step), count(score), + SELECT user, max(score) hs, max(step), count(score), cast(round(sum(time)/60) as INT), max(at) - FROM score WHERE text=? GROUP BY user; + FROM score WHERE text=? GROUP BY user ORDER BY hs DESC; EOF end end