#395

Aggregate Staff Working Hours

For each employee and each day, compute the total time (in minutes) the employee spent in the office. An employee may enter and leave more than once per day; the time for one visit is out_time - in_time. Return day, emp_id, and total_time.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

dayemp_idtotal_time
2020-12-033115
2020-11-28230
2020-11-28370

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid