Ниже запрос занимает более 11 минут для выполнения. SELECT `c`.*, `e`.`name` AS `employee_name`, `e`.`emp_no`, `d`.`code` AS `department_code`, IF(ew.code IS NOT NULL, ew.code, egw.code) AS shift_code, IF(ew.code IS NOT NULL, ew.time_in_from, egw.time_in_from) AS time_in_from, IF(ew.code IS NOT...