The first query will return orders that are not associated with customers and the second one will not
1. select o from Order o where 10000<ALL (Select a.balance from o.customer c join c.account a)
2. select o from Order o JOIN o.customer c where 10000< ALL(Select a.balance from c.accounts a)
I think query 1 will return order that are associated with customers.
Note that joins involving the derived subquery root do not affect the join conditions of the containing query.