diff options
| -rw-r--r-- | src/db_handler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db_handler.py b/src/db_handler.py index e900e4c..4d834e8 100644 --- a/src/db_handler.py +++ b/src/db_handler.py @@ -63,7 +63,7 @@ def get_histogram_detailed() -> str: SELECT count(la.id) as total_count, date_trunc('hour', la.timestamp) as date, cn.ip FROM login_attempt la JOIN connection cn on cn.id = la.connection -WHERE la.timestamp BETWEEN (select max(timestamp) from login_attempt) - interval '1 days' AND (select max(timestamp) from login_attempt) +WHERE la.timestamp BETWEEN (select max(timestamp) from login_attempt) - interval '2 days' AND (select max(timestamp) from login_attempt) GROUP BY date_trunc('hour', la.timestamp), cn.ip ORDER BY COUNT(la.id) DESC ; |
