MYSQL very easy solution using sum function With explaination
we have to display total time spent for each day thats why we are doing group by event day.\nSince in each day there will be in and out time for many employees,
we have to display total time spent for each day thats why we are doing group by event day.\nSince in each day there will be in and out time for many employees, therefore we are doing group by using emp_id also. \n```\nselect event_day as day, emp_id , sum(out_time - in_time) as total_time\nfrom Employees  group by event_day , emp_id;
[]