I have a query that i am trying to obtain data for a specific program, but the column i have to work with lists the program within job title naming conventions. I have figured out how to separate all job titles within this program from other programs, but am looking for a whole number so i can obtain additional total numbers for login, usage and duration. Below is the code i have so far and attached is a description of what it looks like and my desired output.
If i could find a way to combine all Dept Names with APS into one category, then the counts should give me the sums that i require. The word APS isn't always consistent in the names. For most it is at the beginning, for others it is integrated in the body. The other option is to total the two count columns, then i can divide those whole numbers to get a usage percent. I know you can total these within a report but would prefer to do in a query so the report focuses on those 3 numbers.
SELECT employeeinfo.DEPTNAME, Count(dragon.LastUser) AS TotalUsers, Count(dragon.LastLoginName
) AS TotalLogins
FROM employeeinfo INNER JOIN dragon ON employeeinfo.LOGNAME = dragon.LastLoginName
GROUP BY employeeinfo.DEPTNAME
HAVING (((employeeinfo.DEPTNAME) Like "*APS*"));