Answered step by step
Verified Expert Solution
Question
1 Approved Answer
asider the following tables with the attributes (schema) in brackets to answer the questions 2325. Employee (id, name, surname, email, phone, salary, dept) Department (id,
asider the following tables with the attributes (schema) in brackets to answer the questions 2325. Employee (id, name, surname, email, phone, salary, dept) Department (id, name, locn) Location (id, number, street, suburb, city, country) (Note that dept and locn attributes are foreign keys to Department and Location tables.) 23. Write a query (or a set of queries) that will output the name and sumame of all employees whose salary is more than the average salary of employees with the IDs between 150 and 160 . (You may that assume there are enough records to calculate the average.) 4. Write a query (or a set of queries) that will increase the salaries of all employees by 20% if their current salary is less than half of the average, by 10% if their salary is between the average and half of the average, and by 5% otherwise. (You may assume that there are enough records to calculate the average.) Write a query (or a set of queries) to delete the employees that work in a department in Ankara and a salary more than 150% of the average salary. (You may assume that there are enough records to calculate the average and all foreign keys point to valid records.)
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