Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create HR database with the following tables. 1 2. Table 2: Departments 5. Table 5: Regions begin{tabular}{|l|l|l|l|} hline Column Name & Null? & Type

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Create HR database with the following tables. 1 2. Table 2: Departments 5. Table 5: Regions \begin{tabular}{|l|l|l|l|} \hline Column Name & Null? & Type \\ \hline REOICN_1D & NOr NJLL & NUNBER \\ \hline REOICN_NAME & & VARCHAR2(25) \\ \hline \end{tabular} 6. Table 6: Job_history 7. Table 7: Employees Data Integritv constraints are shown helow: 24. write a SQL query to find details of those jobs where the minimum salary exceeds 9000. Return all the fields of jobs. 25. write a SQL query to find the first name, last name, department number, and department name for each employee. 26. write a SQL query to find the first name, last name, department, city, and state province for each employee. 27. write a SQL query to find all those employees who work in department ID 80 or 40 . Return first name, last name, department number and department name. 28. write a SQL query to find all departments, including those without employees. Return first name, last name, department ID, department name. 29. write a SQL query to find the employees who earn less than the employee of ID 182. Return first name, last name and salary. 30. write a SQL query to find the employees and their managers. Return the first name of the employee and manager. 31. write a SQL query to find out which employees have or do not have a department. Return first name, last name, department ID, department name 32. write a SQL query to find the employees who work in the same department as the employee with the last name Taylor. Return first name, last name and department ID. 33. write a SQL query to find all employees who joined on or after 1st January 1993 and on or before 31 August 1997. Return job title, department name, employee name, and joining date of the job. 34. write a SQL query to calculate the difference between the maximum salary of the job and the employee's salary. Return job title, employee name, and salary difference. 35. write a SQL query to calculate the average salary, the number of employees receiving commissions in that department. Return department name, average salary and number of employees. 36. write a SQL query to find the name of the country, city, and departments, which are running there. 37. write a SQL query to calculate the average salary of employees for each job title. 38. write a SQL query to find the employees who earn $12000 or more. Return employee ID, starting date, end date, job ID and department ID. 39. write a SQL query to find out which departments have at least two employees. Group the result set on country name and city. Return country name, city, and number. 40. write a SQL query to calculate the number of days worked by employees in a department of ID 80 . Return employee ID, job title, number of days worked. 41. write a SQL query to find full name (first and last name), and salary of all employees working in any department in the city of London. 42. write a SQL query to find the department name, department ID, and number of employees in each department. 43. write a SQL query to find out the full name (first and last name) of the employee with an ID and the name of the country where he/she is currently employed. 44. write a SQL query to find those employees who joined after 7th September 1987. Return all the fields. 45. Write a SQL query to find the employees whose first or last name begins with 'D'. Return first name, last name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

What are the classifications of Bank?

Answered: 1 week ago