group by completeRnd pools SQL bug