I have a table in which information about employee attendance.
This is how the table looks like:
att_id | scan_date | scan_in_time | scan_out_time |
---|---|---|---|
1 | 2023-10-21 | 2023-10-21 08:10:00 | 2023-10-21 16:20:00 |
2 | 2023-10-21 | 2023-10-21 07:36:00 | 0000-00-00 00:00:00 |
4 | 2023-10-21 | 2023-10-21 07:15:00 | 2023-10-21 16:43:00 |
1 | 2023-10-22 | 2023-10-22 08:25:50 | 2023-10-22 16:23:10 |
Is it possible to get output like below?
att_id | 2023-10-21 | 2023-10-22 |
---|---|---|
1 | 08:10:00 - 16:20:00 | 08:25:50 - 16:23:10 |
2 | 07:36:00 - NULL | NULL |
4 | 07:15:00 - 16:43:00 | NULL |
i'm using MariaDB 10.4 in production environments. thanks in advance!