Query to show Category, Sub category and Item

Query to show Category, Sub category and Item

PGSQL & MSSQL:

SELECT CategoryDefinition.CATEGORYNAME "Category Name", CategoryDefinition.CATEGORYNAME "Category Name", SubCategoryDefinition.NAME "Sub Category Name" ,ItemDefinition.NAME"Item Name" FROM CategoryDefinition left join SubCategoryDefinition on  SubCategoryDefinition.CATEGORYID=CategoryDefinition.CATEGORYID  left join ItemDefinition on ItemDefinition.SUBCATEGORYID = SubCategoryDefinition.SUBCATEGORYID group by CategoryDefinition.CATEGORYNAME,SubCategoryDefinition.NAME,ItemDefinition.NAME order by CategoryDefinition.CATEGORYNAME

          • Related Articles

          • Query to show Account Specific Category, Sub category and Item

            SELECT accountdefinition.org_name "Account Name", CategoryDefinition.CATEGORYNAME "Category Name", SubCategoryDefinition.NAME "Sub Category Name" ,ItemDefinition.NAME"Item Name"   FROM CategoryDefinition left join SubCategoryDefinition on  ...
          • Query to show Average response time for Category

            PGSQL: SELECT accountdefinition.org_name "Account",cd.categoryname "Category", TO_CHAR(((avg(wo.respondedtime)-avg(wo.createdtime))/1000 || ' second')::interval, 'HH24:MI:SS') "Avg Response Time" FROM workorder wo LEFT JOIN workorderstates wos ON ...
          • Query to show time spent by each technician in a ticket.

            Navigate to Reports->New Query Report and execute this report. Under Help->About, check the database you are using and use the appropriate query. MSSQL: SELECT wo.WORKORDERID "Request ID",wo.TITLE "Subject",cd.CATEGORYNAME "Category",scd.NAME ...
          • Export solutions

            Run this query under Reports->New Query Report and export it to the desired format SELECT solution.solutionid "Solutionid", KB_Topics.TOPICNAME " Topic",Solution.TITLE "Subject ",Solution.DESCRIPTION "Contents",solutioninfo.noofhits    ...
          • Query to show Problems, its associated incidents and change_ MSSQL

            SELECT woproblem.PROBLEMID AS "Problem ID", woproblem.TITLE AS "Problem Title", "priodef"."PRIORITYNAME" AS "Problem Priority", "urgdef"."NAME" AS "Problem Urgency",  "statdef"."STATUSNAME" AS "Problem Status", "impactdef"."NAME" AS "Problem Impact", ...