I found this report in the forum to list the number of requests against category.
SELECT cd.CATEGORYNAME "Category",scd.NAME "Subcategory",icd.NAME "Item", count(wo.WORKORDERID) "Request Count" FROM WorkOrder wo LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID LEFT JOIN CategoryDefinition cd ON wos.CATEGORYID=cd.CATEGORYID LEFT JOIN SubCategoryDefinition scd ON wos.SUBCATEGORYID=scd.SUBCATEGORYID LEFT JOIN ItemDefinition icd ON wos.ITEMID=icd.ITEMID WHERE (wo.ISPARENT='1') GROUP BY cd.CATEGORYNAME ,scd.NAME ,icd.NAME
order by 1
We have multiple sites and I want to stipulate within the query what site to report against (The report cannot be for al sites). I have been unable to find how to enter such a parameter within the query, any guidance greatly appreciated.
Example:
We have 3 sites: Site 1; Site 2; Site 3
I want to stipulate within the query to only list number of requests for Site 2 and exclude for the other 2 sites
Bruce