HOW TO: Create a Pivot Table For HelpDesk Satisfaction Survey

Here's som old SQL that makes a nice little table for the sat survery in the K1.

My idea was that this could be pasted into excel really easy so you could create charts, etc...


       Max(IF(SATISFACTION_RATING = 2, COUNT, 0)) AS 'Below Average', 
       Max(IF(SATISFACTION_RATING = 3, COUNT, 0)) AS 'Average', 
       Max(IF(SATISFACTION_RATING = 4, COUNT, 0)) AS 'Good', 
       Max(IF(SATISFACTION_RATING = 5, COUNT, 0)) AS 'Excellent', 
       Max(IF(SATISFACTION_RATING = 0, COUNT, 0)) AS 'Not Rated' 
               COUNT(*) AS COUNT 
        FROM   HD_TICKET T 
               LEFT JOIN USER U 
                 ON T.OWNER_ID = U.ID 
                  T.SATISFACTION_RATING) RAW 

I hope this helps.


  • Thank you for the code, works like a charm - sdnbtech1 12 years ago
  • Good stuff. - rbarth 12 years ago
This post is locked
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ