SELECT `u` . `FirstName` , `u` . `LastName` , `CONCAT` ( `CONCAT` ( COALESCE ( `u` . `FirstName` , ? ) , ? ) , COALESCE ( `u` . `LastName` , ? ) ) AS `FAPName` , `s` . `ScheduleId` , `s` . `AuditId` , `a` . `UserId` AS `FapId` , `s` . `StartDate` , `s` . `EndDate` , `a` . `IAAssessmentType` , `a` . `EAAssessmentType` , `a` . `ComplianceType` AS `ComplainceType` , `a` . `Createdby` , ( SELECT MAX ( `a0` . `IsStatus` ) FROM `AuditSchedule_Application` AS `a0` WHERE `a0` . `ScheduledId` = `s` . `ScheduleId` ) AS `IsStatus` , CASE WHEN `a` . `SAAssessmentType` THEN CASE WHEN ( SELECT MAX ( `a1` . `IsStatus` ) FROM `AuditSchedule_Application` AS `a1` WHERE `a1` . `ScheduledId` = `s` . `ScheduleId` ) = ? THEN ? WHEN ( SELECT MAX ( `a2` . `IsStatus` ) FROM `AuditSchedule_Application` AS `a2` WHERE `a2` . `ScheduledId` = `s` . `ScheduleId` ) = ? THEN ? ELSE ? END ELSE ? END AS `SelfStatus` , CASE WHEN `a` . `IAAssessmentType` THEN CASE WHEN ( SELECT MAX ( `a3` . `IsIAStatus` ) FROM `AuditSchedule_Application` AS `a3` WHERE `a3` . `ScheduledId` = `s` . `ScheduleId` ) = ? THEN ? WHEN ( 