Tested in Build MSSQL (14306)
Go to Reports-New Query Report and execute this report.
Day(dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (
wo.CREATEDTIME/1000),'1970-01-01 00:00:00')) "Date",
count(wo.workorderid) "Total",
count (case when std.ispending='1' THEN 1 ELSE NULL END) "Pending Requests",
count (case when std.Ispending='0' THEN 1 ELSE NULL END) "Closed Requests",
(( select count(nw.notificationid) from Notify_WorkOrder nw left join notification no on nw.notificationid=no.notificationid left join workorder wo1 on nw.workorderid=wo1.workorderid where Day(dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (
wo1.CREATEDTIME/1000),'1970-01-01 00:00:00'))=Day(dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (
wo.CREATEDTIME/1000),'1970-01-01 00:00:00')) ) +
(select count(co.conversationid) from conversation co left join workorder wo2 on wo2.workorderid=co.workorderid where Day(dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (
wo2.CREATEDTIME/1000),'1970-01-01 00:00:00'))=Day(dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (
wo.CREATEDTIME/1000),'1970-01-01 00:00:00')))) "Count conversation" FROM WorkOrder wo
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID
WHERE (wo.ISPARENT='1') and
wo.CREATEDTIME >= <from_lastmonth> AND wo.CREATEDTIME <= <to_lastmonth>
MSSQL