Here is an alternative way using the relay as a latch. (The CD4013 is still a good solution.)
This is for the logic as you describe it but the level 6 signal will always be asserted when the level is above sensor 6 so the pump would never be on. You need the absence of the level 6 signal to switch off the pump. To do this with the above schematic remove Q3 and feed the level 6 signal into the base of Q1. (Via a resistor.) Diode D1 is to prevent the transistor that I forgot to number from trying to drive the pump before the relay contacts close.
Les.
This is for the logic as you describe it but the level 6 signal will always be asserted when the level is above sensor 6 so the pump would never be on. You need the absence of the level 6 signal to switch off the pump. To do this with the above schematic remove Q3 and feed the level 6 signal into the base of Q1. (Via a resistor.) Diode D1 is to prevent the transistor that I forgot to number from trying to drive the pump before the relay contacts close.
Les.