Simple mysql solution [using group by]
```\nselect event_day as day, emp_id,sum(out_time-in_time) as total_time \nfrom employees\ngroup by day,emp_id;
```\nselect event_day as day, emp_id,sum(out_time-in_time) as total_time \nfrom employees\ngroup by day,emp_id;
['MySQL']