Making a rank system

Asked

Viewed 52 times

-1

hello i am trying to create a rank system using sqlite3 and python however I am not getting anywhere,when I consult my database it returns me that: [('002', 5), ('001', 50), ('003', 80)] where 001...002...003 are the user id and the numbers after are the level as I could take this information and turn it to show the users with higher level to lower, an output like this:

003 80
001 50
002 5

1 answer

1


The simplest way to solve it would be by using order by in your selection, like this:

SELECT *
  FROM Usuario 
 ORDER BY Level DESC

Browser other questions tagged

You are not signed in. Login or sign up in order to post.