Sub Queries Exercises
Sub Queries Exercises
1) Write a query to display all the employees who are working in department
name ‘Accounts’
2) Write a query in SQL to display the first name, last name, department
number, and department name for each employee.
3) Write a query in SQL to display the first name, last name, department
number and department name, for all employees for departments 80 or 40.
4) Write a query in SQL to display the first and last name and salary for those
employees who earn less than the employee earn whose number is 182.
5) Write a query in SQL to display the first name of all employees and the first
name of their manager including those who does not working under any
manager.
6) Write a query in SQL to display the first name, last name, and department number
for those employees who works in the same department as the employee who
holds the last name as Taylor.
7) Write a query in SQL to display the name of the department, average salary
and number of employees working in that department who got commission.
8) Write a query in SQL to display the department name, full name (first and last
name) of manager, and their city