SELECT WorkflowInstanceReference, WorkflowControllerName, WorkflowID, WorkflowInstanceItemID, 'Step ' + CAST(WorkflowTemplateStepNumber AS VARCHAR(20)) + ' - ' + WorkflowTemplateStepTitle AS TaskDescription, Wit.WorkflowInstanceCreatedByName AS CreatedBy, DATEDIFF(hh, DateDue, GETDATE()) AS HoursOverdue FROM Wf.Vw_WorkflowInstanceTasks Wit WHERE WorkflowInstanceTaskStatusID = 1 AND DATEDUE < GETDATE() AND AssignedToID = [[assignedtoid]]