DBMS LAB PRACTICE QUESTIONS ON JOINS

                                                                                              
1. Write a query to display the last name, department number, and department name for all employees
2. Create a unique listing of all jobs that are in department 80. Include the location of the department in the output.
3. Write a query to display the employee last name, department name, location ID, and city of all employees who earn a commission.
4. Display the employee last name and department name for all employees who have an  a (lowercase) in their last names.
5. Display the employee last name and employee number along with their manager’s last name and manager number. Label the columns Employee, Emp#, Manager, and Mgr#, respectively.
6.Write a query to display the last name, job, department number, and department name for all employees who work in Toronto.
7.  Modify the query 6 and display all employees including king, who has no manager and order the result by employee number.
8. Create a query that displays employee last names, department numbers, and all the employees who work in the same department as a given employee. Give each column an appropriate label.
9. Show the structure of the JOB_GRADEStable. Create a query that displays the name, job, department name, salary, and grade for all employees.
10. Create a query to display the name and hire date of any employee hired after employee Davies
11. Display the names and hire dates for all employees who were hired before their managers, along with their manager’s names and hire dates. Label the columns Employee, Emp Hired, Manager, and MgrHired, respectively.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enable Notifications OK No thanks