Schedule for KWDS

Deadline for Class Submissions: 0

Error is query: SELECT DISTINCT C1.id as id, C1.name, CONCAT(COALESCE(U1.sca_first,''),' ', COALESCE(U1.sca_last,''),' [',COALESCE(U1.first,''),' ',COALESCE(U1.last,''),']') as user_id, C1.day, ADDTIME(C1.day, SEC_TO_TIME(C1.hours*60)) as end FROM class C1 INNER JOIN coteacher T1 ON T1.class_id = C1.id LEFT OUTER JOIN user U1 ON U1.id = T1.user_id INNER JOIN class C2 ON C2.id != C1.id INNER JOIN coteacher T2 ON C2.id = T2.class_id AND T1.user_id = T2.user_id WHERE C1.kwds_ID = AND C2.kwds_ID = AND ((C1.day >= C2.day AND C1.day < ADDTIME(C2.day, SEC_TO_TIME(C2.hours*60))) OR ((ADDTIME(C1.day, SEC_TO_TIME(C1.hours*60)) > C2.day AND ADDTIME(C1.day, SEC_TO_TIME(C1.hours*60)) <= ADDTIME(C2.day, SEC_TO_TIME(C2.hours*60))))) ORDER BY T1.user_id, C1.day.