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

SQL Worksheet 7 - Subquery

The document contains a series of SQL queries designed to extract specific information from an HR database. It includes questions about employee salaries, department affiliations, and job titles, focusing on comparisons and relationships among employees. Each question aims to utilize subqueries to derive insights from the data.

Uploaded by

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

SQL Worksheet 7 - Subquery

The document contains a series of SQL queries designed to extract specific information from an HR database. It includes questions about employee salaries, department affiliations, and job titles, focusing on comparisons and relationships among employees. Each question aims to utilize subqueries to derive insights from the data.

Uploaded by

saoryayadav3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQL Worksheet – Subqueries (HR Database)

Part A: Questions
Q1. Find the names of employees who earn more than the average salary of all employees.
Q2. List the employees who work in the same department as ‘David Austin’.
Q3. Find the employees whose salary is greater than the salary of ‘Susan Mavris’.
Q4. Display the job titles of employees who earn the minimum salary in the company.
Q5. List the departments that have at least one employee.
Q6. Find the employee(s) who earn the highest salary in each department.
Q7. List the employees whose salary is greater than the average salary of their department.
Q8. Find the department name where ‘Lex De Haan’ works.
Q9. Find employees who earn more than the highest-paid employee in department 50.
Q10. Find employees whose salary matches any salary of employees in department 90.
Q11. List all employees who earn less than the average salary of employees in department 80.
Q12. Find the employee(s) who joined the company before their manager.
Q13. Find the location (city) of the department where ‘Neena Kochhar’ works.
Q14. List the employees who have the same job as ‘Den Raphaely’.
Q15. Find employees who work in a department located in ‘Seattle’.

You might also like