I have a table which has the following columns:
-Agent Name -Ticket ID -Requester's Email
How can I get Agent name along with the number of customers who submit more than 1 tickets?
SELECT agent alias, Count(email) AS [CountOfvisitor email]
GROUP BY agent alias, email
select agentName,count(*) from ( Select AgentName,email,count(*) from TableName group by AgentName,email having count(*)>1 )t group by agentName