hello! I am having a problem with trying to create a row based on a condition and hoping someone can help me.
| id | DateTime | TimeSlot | Seconds |
| 54 | 10:01 | 10:00 | 4200 |
| 65 | 10:35 | 10:30 | 3 |
| 67 | 11:06 | 11:00 | 98 |
In the above table, I want to create a row for every time more than 1 hour. For example, id 54 has 4200 seconds so another row should be created with the same id in the 10:30 timeslot and the seconds subtracted.
| id | DateTime | TimeSlot | Seconds |
| 54 | 10:01 | 10:00 | 4200 |
| 54 | 10:31 | 10:30 | 600 |
| 65 | 10:35 | 10:30 | 3 |