Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

TASK PERFORMANCE

PREFINAL

UTILIZING SUBQUERY
GENERAL INSTRUCTIONS:

 Do not forget to affix your initials on every object you will


create in this activity.

• Make sure that your answers are in chronological order and


you will display a screenshot of the output and your query.

• Failure to comply will invalidate your answers.

• HAPPY CODING! 
Part I : Create the following tables:

1. Table name: locations


2. Table name: employees
3. Table name: jobs

4. Table name: departments


PART 2:

1. Write a quer y to find the names ( first_name , last_name) of


the employees who have a manager and work for a
department based in the united states. (Hint : write single -
row and multiple-row subqueries)

2. Write a quer y to find the names ( first_name , last_name) of


the employees who are managers.

3. Write a quer y to find the names ( first_name , last_name),


the salar y of the employees whose salar y is greater than the
average salary.
4. Write a quer y to find the names ( first_name , last_name),
the salar y of the employees whose salar y is equal to the
minimum salar y for their job grade.
5. Write a quer y to find the names ( first_name , last_name),
the salary of the employees who earn more than the average
salar y and who works in any of the IT departments.

6. Write a quer y to find the names ( first_name , last_name),


the salary of the employees who earn more than mr. Bell.

7. Write a quer y to find the names ( first_name , last_name),


the salar y of the employees who earn the same salar y as the
minimum salar y for all departments.
8. Write a quer y to find the names ( first_name , last_name),
the salary of the employees whose salar y greater than the
average salar y of all departments.

9. Write a quer y to find the names ( first_name , last_name) of


the employees who are not super visors.

10. Write a quer y to display the employee ID, first name, last
names, and department names of all employees.

You might also like