summaryrefslogtreecommitdiff
path: root/src/db_handler.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/db_handler.py')
-rw-r--r--src/db_handler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db_handler.py b/src/db_handler.py
index e97c8ce..e6452f3 100644
--- a/src/db_handler.py
+++ b/src/db_handler.py
@@ -51,7 +51,7 @@ class DBHandler:
cur.execute("""
SELECT password
FROM login_attempt
- WHERE timestamp BETWEEN current_timestamp - interval '1 month' AND timestamp
+ WHERE timestamp BETWEEN (SELECT timestamp FROM login_attempt ORDER BY timestamp DESC LIMIT 1) - interval '1 month' AND timestamp
GROUP BY password
ORDER BY COUNT(password) DESC
LIMIT 1;