SELECT fra.FundsRequestAnswerID , utt.UserTaskID, fra.CreatedBy
FROM FundsRequestAnswers fra
LEFT JOIN WorkflowInstances AS wi ON fra.FundsRequestAnswerID = wi.ObjectID AND wi.ObjectType = 'FundsApply'
LEFT JOIN ( SELECT ut.WorkflowInstanceID ,
MAX(ut.UserTaskID) AS UserTaskID
FROM dbo.UserTasks ut
WHERE ut.TaskID = '1021218'
AND ut.UserID = @UserID
AND ut.DeletedDate IS NULL
GROUP BY ut.WorkflowInstanceID
) utt ON utt.WorkflowInstanceID = wi.WorkflowInstanceID
WHERE fra.ProposedProjectID = 0 AND fra.FundsTypeCode = 'Verify';