BEST solution || MySQL || Pandas || Beats 100% !!
Code\n\n# Write your MySQL query statement below\nSELECT event_day as day, emp_id, SUM(out_time - in_time) as total_time\nFROM Employees\nGROUP BY day, emp_id; 
# Code\n```\n# Write your MySQL query statement below\nSELECT event_day as day, emp_id, SUM(out_time - in_time) as total_time\nFROM Employees\nGROUP BY day, emp_id; \n```\n```\nimport pandas as pd\n\ndef total_time(employees: pd.DataFrame) -> pd.DataFrame:\n    employees[\'total_time\'] = employees[\'out_time\'] - employees[\'in_time\']\n    df = employees[[\'event_day\',\'emp_id\', \'total_time\']]\n    df.columns = [\'day\', \'emp_id\',\'total_time\']\n    return df.groupby([\'day\',\'emp_id\']).sum().reset_index()\n```
['MySQL', 'Pandas']