Change to query

Change to query

I would like to see if a change could be made to the below query to be able to select which business unit the report is to be produced for (we currently have four different business units). It would to also show the date stamp of the notes if possible. 

 SELECT wo.WORKORDERID "Request ID",ti.FIRST_NAME "Support Rep",wo.TITLE "Subject",note.notestext "Notes" 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 Notes note on wo.workorderid=note.workorderid WHERE (dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (wo.CREATEDTIME/1000),'1970-01-01 00:00:00') >= convert(varchar,'2017-07-03 00:00',21) and dateadd(s,datediff(s,GETUTCDATE() ,getdate()) + (wo.CREATEDTIME/1000),'1970-01-01 00:00:00') <= convert(varchar,'2017-07-04 23:59',21))

Regards
Cathy
              New to ADManager Plus?

                New to ADSelfService Plus?