Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write MySQL queries, thanks QUESTIONS Ameril parts Comider the following relational schema for a HR database: REGIONS Region RegionName) COUNTRIES Country ID, Country Name, RegionID)

image text in transcribed

Write MySQL queries, thanks

QUESTIONS Ameril parts Comider the following relational schema for a HR database: REGIONS Region RegionName) COUNTRIES Country ID, Country Name, RegionID) LOCATIONS(Location ID. Address, City, CountryID) DEPARTMENTS(DepartmentID, DepartmentName, ManagerID, LocationID) EMPLOYEES(EmployeeID. FirstName, LastName, Email, Phone, JobID, Salary, DepartmentID, Manager) JOBS JobID. Job Title, MinimumSalary, MaximumSalary) JOB-HISTORY (EmployeeID. StartDate, EndDate, JobID, DepartmentID) The primary keys are underlined. The foreign keys are 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 are managed by each manager in a department. The database also stores information about an employee's job history, Write SQL queries to answer the following: (a) Write a query to get the total salary, maximum, minimum, average salary of employees (job ID wise), for department ID 'DT90' only. (b) Write a query to find the name (first name, last name) of all employees who work in the IT department (c) Write a query to find the name (first_name, last_name) of the employees who are not supervisors. (d) Write a query to find the name (first name, last name), job ID, department ID of the employees who work in London. (e) Write a query to display the job history that were done by any employee who is currently drawing more than 6000 of salary

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions