cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

192
Views
10
Helpful
3
Replies
Beginner

Total Number of Active Agents in an Agent Team

We have several configured Agents in several Agent Teams. I am looking to run a query on total agents in each agent teams who have recently logged in so we can eliminate some of the old configured agents. Any ideas? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Enthusiast

Re: Total Number of Active Agents in an Agent Team

Here we go, look for LastLoginTime to find agents who have logged in recently.

 

SELECT DISTINCT P.FirstName, P.LastName, P.LoginName, MAX(AED.LoginDateTime) AS LastLoginTime, Agent_Team_Member.AgentTeamID, Agent_Team.EnterpriseName
FROM Agent A, Agent_Event_Detail AED, Person P, Agent_Team_Member, Agent_Team
WHERE A.SkillTargetID = AED.SkillTargetID
and Agent_Team_Member.AgentTeamID = Agent_Team.AgentTeamID
and A.SkillTargetID = Agent_Team_Member.SkillTargetID
AND A.PersonID = P.PersonID
GROUP BY P.FirstName, P.LastName, P.LoginName, Agent_Team_Member.AgentTeamID, Agent_Team.EnterpriseName
ORDER BY LastLoginTime desc

 

 

View solution in original post

3 REPLIES 3
Highlighted
Enthusiast

Re: Total Number of Active Agents in an Agent Team

Here we go, look for LastLoginTime to find agents who have logged in recently.

 

SELECT DISTINCT P.FirstName, P.LastName, P.LoginName, MAX(AED.LoginDateTime) AS LastLoginTime, Agent_Team_Member.AgentTeamID, Agent_Team.EnterpriseName
FROM Agent A, Agent_Event_Detail AED, Person P, Agent_Team_Member, Agent_Team
WHERE A.SkillTargetID = AED.SkillTargetID
and Agent_Team_Member.AgentTeamID = Agent_Team.AgentTeamID
and A.SkillTargetID = Agent_Team_Member.SkillTargetID
AND A.PersonID = P.PersonID
GROUP BY P.FirstName, P.LastName, P.LoginName, Agent_Team_Member.AgentTeamID, Agent_Team.EnterpriseName
ORDER BY LastLoginTime desc

 

 

View solution in original post

Beginner

Re: Total Number of Active Agents in an Agent Team

Thank you very much Piyush, you are the best. Appreciate all your help.
Enthusiast

Re: Total Number of Active Agents in an Agent Team

You're welcome :-)

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here