Need to find out the user made inactive from Last 6 months.
Hi,
Need help to find out how many users were made inactive from last 6 months, I was trying to do it via DB but not getting the exact table where i can get the users history captured.
Thanks in advance.
Here’s a query showing when users were inactivated within the past six months.
select a.loginid, b.timestamp
from agileuser a
inner join item_history b on a.id = b.item
where a.enabled = 0
and b.details like ‘%was<Active>is<Inactive>%’
and b.timestamp > (sysdate – 183)
;
Slight correction, as what you specified didn’t work for me right away until I changed the like clause to lower case:
SELECT a.loginid,
b.timestamp,
b.details
FROM agile.agileuser a
INNER JOIN agile.item_history b
ON a.id = b.item
WHERE a.enabled = 0
AND b.timestamp > ( sysdate – 183 )
AND Lower(b.details) LIKE ‘%was<active>is<inactive>%’
ORDER BY timestamp DESC;