Fixed aliasing with subqueries