I have a query that changes the status of some fields and rate of another field.
fiddle expample
The logic checks the sum of all rows until a value of 23 is re