diff options
Diffstat (limited to 'src/db_handler.py')
| -rw-r--r-- | src/db_handler.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/db_handler.py b/src/db_handler.py index 7ba74f8..7c40d51 100644 --- a/src/db_handler.py +++ b/src/db_handler.py @@ -63,6 +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 current_timestamp - interval '2 days' AND la.timestamp GROUP BY date_trunc('hour', la.timestamp), cn.ip ORDER BY COUNT(la.id) ; |
