select m from Member m
where m.age > (select avg(m2.age) from Member m2)
select m from Member m
where (select count(o) from Order o where m = o.member) > 0
[NOT] EXISTS (subquery) : 서브쿼리에 결과가 존재하면 참
ALL (subquery) : 조건을 모두 만족하면 참
ANY, SOME (subquery) : 조건을 하나라도 만족하면 참
[NOT] IN (subquery) : 서브쿼리의 결과 중 하나라도 같은 것이 있으면 참
select m from Member m
where exists (select t from m.team t where t.name = 'A')
select o from Order o
where o.orderAmount > all (select p.stockAmount from Product p)
select m from Member m
where m.team = any (select t from Team t)