U kunt OUTER APPLY gebruiken . Het is als een gecorreleerde subquery maar staat meerdere kolommen toe:
SELECT p.ID,
p.Patient,
p.ProcedureType,
p.ProcedureDate,
[LastExamDate] = exam.ProcedureDate,
[DaysSinceLastExam] = DATEDIFF(DAY, exam.ProcedureDate, p.ProcedureDate),
[LastExamType] = exam.ProcedureType
FROM Procedures p
OUTER APPLY
( SELECT TOP 1 exams.ProcedureType, exams.ProcedureDate
FROM Procedures exams
WHERE Exams.ProcedureType LIKE '%Exam%'
AND Exams.Patient = p.Patient
AND Exams.ProcedureDate <= p.ProcedureDate
ORDER BY Exams.ProcedureDate DESC
) exam;