Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION 5 Consider the following relational schema for a company: country ( ceuntrolD , countrxName, RegionlD ) employee ( emplexeeID , firstName, lastName, email, phoneNe,
QUESTION
Consider the following relational schema for a company:
countryceuntrolD countrxName, RegionlD
employeeemplexeeID firstName, lastName, email, phoneNe, hireDate, salary, iobID, managerID, departmentuR
jobjobLD jobTitle, minSalary, maxSalarx
locationslocationID address, countrxIIR
departmentdepatmentID departmentName, managerID, lecationID
regionregionW regionName
The primary keys are underlined. The foreign keys are highlighted in italics. Each region has many countries, while each country has many company locations. Each location has many departments and each department has many employees working in it Many employees can work under each job title.
Page of
Write SQL queries to answer the following:
a Write a query to display the full name and hire date for all employees who were hired in the year
b Write a query to get the number of employees with the same job.
c Write a query to get the average salary for all departments employing more than employees.
d Retrieve the name and address of all employees who work for the 'Research' department
e Retrieve all employees in the Human Resources Department whose salary is between and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started