SELECT
aau.FIRST_NAME AS "Technician Name",
COUNT(Distinct wo.WORKORDERID) AS "Ticket Count"
FROM WORKORDER wo
LEFT JOIN WO_ASSESSMENT wa ON wo.WORKORDERID=wa.WORKORDERID
LEFT JOIN WO_TECH_INFO wti ON wa.ASSESSMENTID=wti.ASSESSMENTID
LEFT JOIN SDUSER sd ON wti.TECHNICIANID=sd.USERID
LEFT JOIN AAAUSER aau ON sd.USERID = aau.USER_ID
WHERE wa.EXECUTEDTIME >= <from_thisweek> AND wa.EXECUTEDTIME <= <to_thisweek> AND (wti.TECHNICIANID is not null) AND (wo.ISPARENT='1')
GROUP BY "Technician Name"
MSSQL:
SELECT
aau.FIRST_NAME AS "Technician Name",
COUNT(Distinct wo.WORKORDERID) AS "Ticket Count"
FROM WORKORDER wo
LEFT JOIN WO_ASSESSMENT wa ON wo.WORKORDERID=wa.WORKORDERID
LEFT JOIN WO_TECH_INFO wti ON wa.ASSESSMENTID=wti.ASSESSMENTID
LEFT JOIN SDUSER sd ON wti.TECHNICIANID=sd.USERID
LEFT JOIN AAAUSER aau ON sd.USERID = aau.USER_ID
WHERE wa.EXECUTEDTIME >= <from_thisweek> AND wa.EXECUTEDTIME <= <to_thisweek> AND (wti.TECHNICIANID is not null) AND (wo.ISPARENT='1')
GROUP BY aau.FIRST_NAME