SELECT *, DATE_FORMAT(thesis_date_insert, '%e.%c.%Y') AS date_insert, DATE_FORMAT(thesis_date_update, '%e.%c.%Y') AS date_update, DATE_FORMAT(t_s_date_receive, '%e.%c.%Y') AS date_receive, DATE_FORMAT(t_s_date_accept, '%e.%c.%Y') AS date_accept, DATE_FORMAT(t_s_date_end, '%e.%c.%Y') AS date_end FROM thesis LEFT JOIN thesis_student USING(thesis_id) LEFT JOIN person ON thesis_head = person_id WHERE thesis_id = '942'