Last and final attempt at fixing a union statement as a subquery in the from clause of a select statement