As the title says i want to display only rows where we see that the attribute "Value" changes compared to previous rows
SELECT *
FROM Therapy
WHERE Therapy.DataTypeId = @PumpTherapyDataType
AND Therapy.ConsultId = 5
AND Therapy.Is_Active = 1
this is the result set of the query below:
Id Hours TherapyType Value Is_Active
9704 24 1 0.5 true
9705 1 1 0.5 true
9706 2 1 0.5 true
9707 1 1 0.5 true
9708 4 1 0.6 true
9709 5 1 0.75 true
97010 8 1 0.75 true
and this is the expected result
Id Hours TherapyType Value Is_Active
9704 24 1 0.5 true
9708 4 1 0.6 true
9709 5 1 0.75 true