IBM Maximo: SQL Queries - tabela LOGINTRACK
SQL Queries
Logins nos últimos 2 dias
select * from logintracking where attemptresult='LOGIN' and attemptdate > sysdate - 2
Listar os Logins por hora
select extract(hour from (cast(attemptdate as timestamp))) login_hour, count(*) num_login from logintracking where attemptresult='LOGIN' and attemptdate > sysdate - 10 group by extract(hour from (cast(attemptdate as timestamp))) order by extract(hour from (cast(attemptdate as timestamp)))
Arquivamento
Queries uteis para arquivamento/exclusao de registros em tabelas
select to_char(attemptdate, 'YYYY') as YEAR1, count(1) as CONT from logintracking group by to_char(attemptdate, 'YYYY') order by to_char(attemptdate, 'YYYY')
2019 296.852 2020 205.320 2021 221.299