SELECT datediff(event_dayoff.stop_date,event_dayoff.start_date) as num_date,event_dayoff.s_id,type_dayoff.type_dayoff_id, event_dayoff.start_date, event_dayoff.stop_date
FROM (event_dayoff LEFT JOIN type_dayoff ON type_dayoff.type_dayoff_id=event_dayoff.type_dayoff_id)
WHERE event_dayoff.m_id=437
ORDER BY s_id