Beats 99.74% !!!!!
Step 1select event_day as day and emp_id from tableStep 2As we have to see the details for each emp and then for same day so group by emp_id and event_dayStep 3
# Step 1
select event_day as day and emp_id from table

# Step 2
As we have to see the details for each emp and then for same day so group by emp_id and event_day

# Step 3
For total_time we need to calculate out_time - in_time so add it

# Step 4
But we need total for each day for single emp so add sum to the out_time - in_time

# Step 5
Add all these together

And yes you're done!! Good job!!!

# Code
```mssql []
select event_day as day, emp_id,sum(out_time - in_time) as total_time from Employees
group by emp_id,event_day
```
['MS SQL Server']