0% found this document useful (0 votes)
934 views2 pages

SQL Fundamentals - Practice 07

The document contains instructions for HR to generate several reports using set operators in Oracle SQL: 1. Generate a list of department IDs that do not contain the job ID ST_CLERK. 2. Produce a list of countries that have no departments located in them with the country ID and name. 3. List jobs for departments 10, 50, and 20 in that specified order with job ID and department ID. 4. Create a report of employee IDs and job IDs where employees currently have the same job title as when initially hired. 5. Write a compound query to generate a report with last name, department ID from EMPLOYEES and department ID, department name from DE

Uploaded by

Abby AR
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
934 views2 pages

SQL Fundamentals - Practice 07

The document contains instructions for HR to generate several reports using set operators in Oracle SQL: 1. Generate a list of department IDs that do not contain the job ID ST_CLERK. 2. Produce a list of countries that have no departments located in them with the country ID and name. 3. List jobs for departments 10, 50, and 20 in that specified order with job ID and department ID. 4. Create a report of employee IDs and job IDs where employees currently have the same job title as when initially hired. 5. Write a compound query to generate a report with last name, department ID from EMPLOYEES and department ID, department name from DE

Uploaded by

Abby AR
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

Practice 7

1. The HR department needs a list of department IDs for departments that do not contain the
job ID ST_CLERK. Use set operators to create this report.

2. The HR department needs a list of countries that have no departments located in them.
Display the country ID and the name of the countries. Use set operators to create this report.

3. Produce a list of jobs for departments 10, 50, and 20, in that order. Display job ID and
department ID using set operators.

4. Create a report that lists the employee IDs and job IDs of those employees who currently
have a job title that is the same as their job title when they were initially hired by the
company (that is, they changed jobs but have now gone back to doing their original job).

Oracle Database 10g: SQL Fundamentals I 7 - 25


Practice 7 (continued)
5. The HR department needs a report with the following specifications:
- Last name and department ID of all the employees from the EMPLOYEES table,
regardless of whether or not they belong to a department
- Department ID and department name of all the departments from the DEPARTMENTS
table, regardless of whether or not they have employees working in them
Write a compound query to accomplish this.

Oracle Database 10g: SQL Fundamentals I 7 - 26

You might also like