Published on

Leetcode - 1741. Find Total Time Spent by Each Employee

Authors
  • avatar
    Name
    Indo Yoon
    Twitter
Table of Contents

문제

[Loading...

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

LeetCode

](https://leetcode.com/problems/find-total-time-spent-by-each-employee/)

정답

SELECT event_day AS day, emp_id, SUM(out_time) - SUM(in_time) AS total_time
FROM Employees
GROUP BY emp_id, event_day