I need to split one date record into a several date records (dynamically, depending on a date range that overlaps) like this in MySQL:
input data:
level |start_time |end_time
1 2018-12-24 09:00:00 2018-12-25 09:00:00
Output result should look like:
level |start_time |end_time
1 2018-12-24 09:00:00 2018-12-25 00:00:00
1 2018-12-25 00:00:00 2018-12-25 09:00:00
Any help is much appreciated.