How to list all HEAT Self Service Logins and a count of Issues Logged

Version 1

    Details

    What is the SQL query to return a list of all HEAT Self Service Logins and a count of the number of issues each has logged?


    Resolution

    Run the following query in SQL Management Studio:

    SELECT CallLog.CustID, COUNT(CustID)

    FROM CallLog

    GROUP BY CustID HAVING COUNT(CustID) >1

    AND CallLog.CustID IN

    (SELECT CustID FROM HEATCAI)

    ORDER BY COUNT(CustID)DESC