It is probably blindingly obvious but I am stumped - logic is explained below
<colgroup><col span="3"><col><col><col span="4"><col><col></colgroup><tbody>
ID
COLOR
TEMP
StartDate
EndDate
Y/N
123ABC
green1
hot
01/01/2017
Y
123ABC
01/01/2017
Y
123ABC
red2
hot
01/01/2017...