From 396c580eb2b3a6c9789d22df4628a66ae08a3083 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 24 Mar 2024 15:10:46 +0100 Subject: chart sort by login attempt asc --- src/db_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/db_handler.py b/src/db_handler.py index 1c271d6..7ba74f8 100644 --- a/src/db_handler.py +++ b/src/db_handler.py @@ -64,7 +64,7 @@ SELECT count(la.id) as total_count, date_trunc('hour', la.timestamp) as date, cn FROM login_attempt la JOIN connection cn on cn.id = la.connection GROUP BY date_trunc('hour', la.timestamp), cn.ip -ORDER BY date_trunc('hour', la.timestamp) DESC; +ORDER BY COUNT(la.id) ; """) histogram = cur.fetchall() -- cgit v1.2.3