Completing table and reorganising queries