diff options
| author | user <user@node5.net> | 2024-03-24 15:15:06 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-03-24 15:15:06 +0100 |
| commit | ccf0ac94e6c375fbfc0c1c9b437d4420c4b933cd (patch) | |
| tree | 4752f13e4938621000e4b8ac8f7e45002fff2eb8 /src/db_handler.py | |
| parent | 396c580eb2b3a6c9789d22df4628a66ae08a3083 (diff) | |
chart limit to last 2 days
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) ; |
