Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 2012. (b) (c) (5 marks) Write a query to get the number of employees with the same job. (5 marks) Write a query to get the average salary for all departments employing more than 20 employees. (5 marks) Retrieve the name and address of all employees who work for the Research' department (5 marks) Retrieve all employees in the Human Resources Department whose salary is between 25,000 and 30,000 (d) (e) QUESTION 5 Consider the following relational schema for a company: country(countryID, countryName, RegionID) employee(employeeID, firstName, lastName, email, phoneNo, hire Date, salary, jobID, managerID, departmentID) job(jobID, jobTitle, minSalary, maxSalary) locations(locationID, address, countryID) department(depatmentID, departmentName, managerID, locationID) region(regionID, 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
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