select distinct r.requestId, r.description + ' ' + r.trackingId as fullDescription, rn.noteText from tbl_SCRUM_Requests r with (nolock) inner join tbl_SCRUM_RequestNotes rn with (nolock) on r.ownerId = rn.ownerId and r.ownerType = rn.ownerType and r.requestId = rn.requestId where r.ownerId = and r.ownerType = and r.statusCode = 'X' and r.assignedTo = and r.deployed <> 'Y' and rn.noteType = 'deployment' and rn.noteText like'%COMMIT%'