✅ SIMPLE SOLUTION ✅
IntuitionApproachGroup by emp_id and the event_day, which will give the uniqe day with respect to employee id.
To calculate the total time, used mathematical op
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->
Group by emp_id and the event_day, which will give the uniqe day with respect to employee id.
To calculate the total time, used mathematical operator (-), subracted the total in time from the total of the out time.


# Code
```postgresql []
-- Write your PostgreSQL query statement below
SELECT event_day AS day, emp_id, SUM(out_time) - SUM(in_time) AS total_time
FROM employees
GROUP BY emp_id, event_day
```
['PostgreSQL']