Unable to use subqueries + exists + projections