diff options
| author | user <user@node5.net> | 2024-03-29 10:52:25 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-03-29 10:52:25 +0100 |
| commit | 5d8a3d623e982425a5bbb0dfd003fc3cce8d2843 (patch) | |
| tree | e27f3635c13ac6830651e37965b40741ead8ab98 /src/db_handler.py | |
| parent | 3c07bae79e49eeb515721755461d4ed1a8920fa4 (diff) | |
chart - show 3 days
Diffstat (limited to 'src/db_handler.py')
| -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 4d834e8..9556d6c 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 '2 days' AND (select max(timestamp) from login_attempt) +WHERE la.timestamp BETWEEN (select max(timestamp) from login_attempt) - interval '3 days' AND (select max(timestamp) from login_attempt) GROUP BY date_trunc('hour', la.timestamp), cn.ip ORDER BY COUNT(la.id) DESC ; |
