My SQL Solution
The total time in minute spend in office\nWithin one day, one employee can enter and leave the office\n--> mean we can group by date\nbut if at one day 2 peron 
The total time in minute spend in office\nWithin one day, one employee can enter and leave the office\n--> mean we can group by date\nbut if at one day 2 peron where presnt in office at diffrent time in that case we need to consider 2nd column as emp_id for grouping \n\nTo calculate total time spend by employee we will use sum(  ) function.\n\n\n                  select  event_day as day , emp_id , sum(out_time-in_time) as total_time\n                 from Employees\n                 group by event_day , emp_id;
['MySQL']