From e88831691966fb70c56d017915a4422a547e258e Mon Sep 17 00:00:00 2001 From: Sheppy Date: Wed, 30 Sep 2020 13:20:37 +0200 Subject: [PATCH] show only rank of active players etc --- python/backends/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/backends/database.py b/python/backends/database.py index 434d583..690678e 100644 --- a/python/backends/database.py +++ b/python/backends/database.py @@ -84,7 +84,8 @@ def getPlayerRank(player): conn = sqlite3.connect("players.sqlite") cursor = conn.cursor() - cursor.execute("SELECT COUNT(*) from players where (mu-2*sigma) > (?-2*?);", + cursor.execute('''SELECT COUNT(*) from players where (mu-2*sigma) > (?-2*?) + and not lastgame is null and games >= 10;''', (player.rating.mu, player.rating.sigma)) rank = cursor.fetchone()[0] conn.close()