Test Your Knowledge 2

Test your knowledge by answering following questions.

Note: Kindly use the below mentioned tables only from HR Schema. Don’t create your own tables.

• COUNTRIES • DEPARTMENTS • EMPLOYEES • JOBS
• JOB_HISTORY • LOCATIONS • REGIONS
  1. Write a query in SQL to display the first name, last name, department number, and department name for each employee.
  2. Write a query in SQL to display the first and last name, department, city, and state province for each employee.
  3. Write a query to display the first name, last name, salary, and job title for all employees.
  4. Write a query to display the first name, last name, department number and department name, for all employees for departments 80 or 40.
  5. Write a query to display those employees who contain a letter z to their first name and also display their last name, department, city, and state province.
  6. Write a query to display all departments including those where does not have any employee.
  7. Write a query to display the first and last name and salary for those employees who earn less than the employee earn whose number is 182.
  8. Write a query to display the first name of all employees including the first name of their manager.
  9. Write a query to display the department name, city, and state province for each department.
  10. Write a query to display the first name, last name, department number and name, for all employees who have or have not any department.
  11. Write a query to display the first name of all employees and the first name of their manager including those who does not working under any manager.
  12. Write a query 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.
  13. Write a query 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.
  14. Write a query 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.
  15. Write a query to display the name of the department, average salary and number of employees working in that department who got commission.
  16. Write a query to display the full name (first and last name) of employees, job title and the salary differences to their own job for those employees who is working in the department ID 80.
  17. Write a query to display the name of the country, city, and the departments which are running there.
  18. Write a query to display department name and the full name (first and last name) of the manager.
  19. Write a query to display job title and average salary of employees.
  20. Write a query to display the details of jobs which was done by any of the employees who is presently earning a salary on and above 12000.
  21. 21.Write a query to display the country name, city, and number of those departments where at least 2 employees are working.
  22. Write a query to display the department name, full name (first and last name) of manager, and their city.
  23. Write a query to display the employee ID, job name, number of days worked in for all those jobs in department 80.
  24. Write a query to display the full name (first and last name), and salary of those employees who working in any department located in London.
  25. Write a query 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.
  26. Write a query to display the department name and number of employees in each of the department.
  27. Write a query to display the full name (first and last name) of employee with ID and name of the country presently where (s)he is working.

To view the solution to above questions kindly read next blog.

In case of any discrepancies or doubts do contact me.
Best of Luck Friends
.

Published by Girish Kirtikumar Mehta.

Software engineer with 25+ years of experience in software development. Have exposure to domains like Core Banking System, Islamic Banking, Mutual Funds, Credit Cards, Insurance, Digital Gifts, Accounting, Construction, etc. Developed applications using C, various versions of Delphi (3, 5, 7, 2005, 2007, Xe2, Xe8 and 12.2), Oracle SQL & PL/SQL, MS SQL & T-SQL, MySQL, MS Access.

One thought on “Test Your Knowledge 2

Leave a reply to Kiran Cancel reply