Remove Subquery, Datatype correction