Scripts for Hunter New England active users for SR
This is the script to run for Hunter New England to get a list of typists and their groups, along with when they last had an activity on the system: Select u.userlogin, u.FirstName, u.LastName, ug.GroupID,ug.[Description],u.LastLoginTime, max(a.finished) as 'LastActivity' from [User] u inner join activity a on a.[user] = u.userlogin and a.ActivityType in (1,3) inner join UserMember um on um.UserLogin = u.UserLogin inner join usergroup ug on ug.GroupID = um.GroupID where u.UserType = 3 group by u.userlogin, u.FirstName, u.LastName, ug.GroupID,ug.[Description],u.LastLoginTime This is the script to run for Hunter New England to get a list of Authors and their last used department, along with when they last had an activity on the system: Select u.userlogin, u.FirstName, u.LastName, d.[description],u.LastLoginTime, max(a.finished) as 'LastActivity' from [User] u inner join activity a on a.[user] = u.userlogin and a.ActivityType in (0,2) inner join Department d on d.DepartmentCode = u.LastDepartment where u.UserType = 1 group by u.userlogin, u.FirstName, u.LastName, d.[description], u.LastLoginTime