MySQL | Faster than 92.32% | Elegant solution
\nSELECT\n    event_day AS day,\n    emp_id, \n    SUM(out_time - in_time) AS total_time\nFROM Employees\nGROUP BY emp_id, event_day;\n\n\n\n
```\nSELECT\n    event_day AS day,\n    emp_id, \n    SUM(out_time - in_time) AS total_time\nFROM Employees\nGROUP BY emp_id, event_day;\n```\n\n![image](https://assets.leetcode.com/users/images/2b732d8e-39f7-435f-a685-2d9a40eff7a5_1648472923.122498.png)\n
[]