Convert Classification visible query into a union all