I was trying to create a report that showed all the open calls for a particular subcategory, in particular all the work log notes.
I have the query below which gives me all the information that I need:
SELECT ti.FIRST_NAME "Technician",wo.WORKORDERID "Request ID",ti.FIRST_NAME "Technician",wotodesc.FULLDESCRIPTION "Description",pd.PRIORITYNAME "Priority",std.STATUSNAME "Request Status",longtodate(wo.CREATEDTIME) "Created Time",longtodate(wo.DUEBYTIME) "DueBy Time",rc.DESCRIPTION "Updates" ,wo.TIMESPENTONREQ/3600000 "Time Spent" FROM WorkOrder wo LEFT JOIN WorkOrderToDescription wotodesc ON wo.WORKORDERID=wotodesc.WORKORDERID LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID LEFT JOIN SubCategoryDefinition scd ON wos.SUBCATEGORYID=scd.SUBCATEGORYID LEFT JOIN SDUser td ON wos.OWNERID=td.USERID LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID LEFT JOIN PriorityDefinition pd ON wos.PRIORITYID=pd.PRIORITYID LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID LEFT JOIN RequestCharges rc ON wo.WORKORDERID=rc.WORKORDERID WHERE ((scd.NAME = 'Ops List') AND ((std.STATUSNAME = 'Onhold') OR (std.STATUSNAME = 'Open'))) AND wo.ISPARENT=1 ORDER BY 1, 7
EXCEPT
That it groups them via the technical (which is what I want), but then creates an individual line for each work order entry - so I see the description 2 or 3 times. I would like it to group all the work order descriptions together.
I have tried doing a group by, but that doesnt seem to work - any suggestions would be greatly appreciated.
Thank you ManageEngine community
Paul