Open Cases By User By Status (with case's name)

SugarCRM

 

SugarCRM is a cloud CRM from the SugarCRM software company, that includes sales force automation, marketing campaigns, customer support, collaboration, reporting, etc. features.

Open Cases By User By Status (with case's name)

Query Text

SELECT U."user_name" 'User Name',C."Name" 'Case Name',
    SUM(case when C."Status" = 'New' then 1 else 0 end) 'New',
    SUM(case when C."Status" = 'Assigned' then 1 else 0 end) 'Assigned',
    SUM(case when C."Status" = 'Pending Input' then 1 else 0 end) 'Pending Input'
  FROM "cases" C, "Users" U
  WHERE C."Status" IN ('New','Assigned','Pending Input') and
        C."assigned_user_id" =U."Id"
  GROUP BY C."Name"
  order by U."user_name", C."Name"
  

Open Query