0% found this document useful (0 votes)
64 views1 page

Assignment Subquery

This document contains 10 queries to retrieve information from various database tables: 1) display departments managed by Smith, 2) display current year jobs and employees, 3) display employees without job history, 4) display average salary by department over $10,000, 5) display average past job salaries, 6) display department for employees with last name Abel, 7) display current jobs for past IT Programmers, 8) display past jobs for IT Programmers, 9) display city of employee 105, 10) display third highest salary overall. It uses tables like jobs, employees, job_history, departments, and locations to answer questions about employees, salaries, jobs, and departments.

Uploaded by

Divya Shrivastav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views1 page

Assignment Subquery

This document contains 10 queries to retrieve information from various database tables: 1) display departments managed by Smith, 2) display current year jobs and employees, 3) display employees without job history, 4) display average salary by department over $10,000, 5) display average past job salaries, 6) display department for employees with last name Abel, 7) display current jobs for past IT Programmers, 8) display past jobs for IT Programmers, 9) display city of employee 105, 10) display third highest salary overall. It uses tables like jobs, employees, job_history, departments, and locations to answer questions about employees, salaries, jobs, and departments.

Uploaded by

Divya Shrivastav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Display details of departments managed by ‘Smith’.

2. Display jobs into which employees joined in the current year. Use table jobs and
employees with this condition
TO_CHAR(HIRE_DATE,'YYYY')=TO_CHAR(SYSDATE,'YYYY')
3. Display employees who did not do any job in the past.(job_history,employees)
job_history table contains data for past employees
4. Display department_id and average salary for employees who earns more than
10000
5. Display job title and average salary for employees who did a job in the past.
6. Display the department details in which employee last name is Abel
7. Display details of current job for employees who worked as IT Programmers
(Jobs,employees)
8. Display details of current job for employees who worked as IT Programmers in
the past.
9. Display the city of employee whose employee ID is 105.
(locations,departments,employees)
10. Display third highest salary of all employees

11.

You might also like