Hello,
I need help building out the logic that will insert a row based on a few conditions.
When the hours type = HSB and the max date for "HSB" hours type is older than "forecast" hours type max date then insert a row with the hours set to 40
| Date | Employee ID | Hours_Type | Hours | Min Date | Max Date |
| 2020-01-19 | 01 | Actual | 38 | 2020-01-19 | 2020-02-09 |
| 2020-01-19 | 01 | Forecast | 19 | 2020-01-19 | 2020-04-05 |
| 2020-01-19 | 01 | HSB | 40 | 2020-01-19 | 2020-02-09 |
Please let me know if you can help.
Thank you,
Rahshid