Lab Practice Sheet - 7 (JOINS)
Lab Practice Sheet - 7 (JOINS)
Lab- 7 (JOINS)
Objective: At the end of the assignment, students will be able to apply JOINS (
INNER/NATURAL/OUTER/CROSS) and perform Set Operations ( UNION/INTERSECT/MINUS)
using more than one table.
account: branch:
Objective 2: Solve below queries using HR Schema Using JOINS execute the given question
1. Display last name, job title of employees who have commission percentage and belongs to
department 30.
2. Write a query to display the last name, job, department number, and department name for all
employees who work in Toronto.
3. Display the employee last name and department name for all employees who have an a
(lowercase) in their last names.
4. Write a query to display the employee last name, department name, location ID, and city of
all employees who earn a commission.
5. Create a unique listing of all jobs that are in department 80. Include the location of the
department in the output.
6. Write a query to display the last name, department number, and department name for all
employees.
7. Write a query in SQL to display the first name, last name, salary, and job grade for all
employees.
8. 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.
9. Write a query in SQL to display those employees who contain a letter z to their first name and
also display their last name, department, city, and state province.
10. Write a query in SQL to display all departments including those where does not have any
employee.
11. Write a query in SQL to display the department name, city, and state province for each
department.
12. Write a query in SQL to display the first name, last name, department number and name, for
all employees who have or have not any department.
13. Write a query in SQL to display department name and the full name (first and last name) of
the manager.
14. Write a query in SQL to display department name and the full name (first and last name) of
the manager.
15. Write a query in SQL to display the full name (first and last name), and salary of those
employees who working in any department located in London.
16. Write a query in SQL to display full name(first and last name), job title, starting and ending
date of last jobs for those employees with worked without a commission percentage.
17. Write a query in SQL to display the full name (firt and last name ) of employee with ID and
name of the country presently where (s)he is working.
18. Write a query in SQL to display the job title, department name, full name (first and last
name ) of employee, and starting date for all the jobs which started on or after 1st January,
1993 and ending with on or before 31 August, 1997.
19. Write a query in SQL to display the full name (first and last name ) of employee, and job title
of those employees who is working in the department which ID 80 and deserve a commission
percentage.
Department of CSE (AI/AI&ML)
20. Write a query in SQL to display job title, full name (first and last name ) of employee, and the
difference between maximum salary for the job and salary of the employee.