Verbessere die Watershed-Logik mit dem Abfrage-Tool

closing this , I wrote here a more elaborated statement .
I will create a separate case for the long execution time of select MAX(id) from account_move@sql