finish generating partial queries