Having clause
select department_id, min(salary)
from employees
group by department_id;
↓ ↓ ↓
select department_id, min(salary)
from employees
group by department_id
having min(salary) > (select min(salary)
from employees
where department_id = 20);
'Oracle > SQL Fundamentals I' 카테고리의 다른 글
9일차 # 6-13:single-row 서브쿼리의 리턴 값이 null일 경우 (0) | 2012.04.16 |
---|---|
9일차 # 6-12: Multiple-row subquery (0) | 2012.04.16 |
9일차 # 6-10: Group functions in subquery (0) | 2012.04.16 |
9일차 # 6-8: Single-row (comparison) operator (0) | 2012.04.16 |
9일차 # 6-7: 서브쿼리 종류 (0) | 2012.04.16 |