Open main menu

CDOT Wiki β

Changes

J.Y.S

409 bytes added, 23:45, 19 October 2010
7.
''James''
<pre>
select department_id, job_id, avg(salary) "Average Dept/Job Pay", min(salary) "Lowest Dept/Job Pay"
from employees
where upper(job_id) not like '%VP'
and department_id != all(select department_id
from departments
where upper(department_name) in ('IT','SALES'))
group by department_id, job_id
having min(salary) between 5000 and 15000
order by department_id, job_id
</pre>
1
edit