Hands-on task
SQLite: ranking with a window function
The database /root/game.db has a table scores(player TEXT, points INTEGER) with players' results. Write a query with the window function ROW_NUMBER() (or RANK()) that assigns each player a place in the tournament by descending points, and write the result to /root/rank.txt in the format player|place. The player with the most points must have place 1.
- window functions
- row_number
- ranking
- order by
- sqlite3