What is the average salary for each job?
select avg(salary) from employees group by job_id
What are the job ids for jobs that average more than 8000?
select job_id from employees group by job_id having avg(salary) > 8000