✅ Simple solution using only GROUP BY ✅
\n\n# Approach\n Describe your approach to solving the problem. \nSimple solution just we need to use the GROUP BY, it will group each  employees on same day, h
\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nSimple solution just we need to use the GROUP BY, it will group each  employees on same day, hence we can sum of their in_time and out_time.\n\nUsed 1,2 in GROUP BY it means used first and scond column in the select query.\n\n# Code\n```postgresql []\n-- Write your PostgreSQL query statement below\nSELECT event_day as day, emp_id, SUM(out_time) - SUM(in_time) as total_time \nFROM Employees\nGROUP BY 1,2\n```
['PostgreSQL']