Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

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

Students also viewed these Databases questions

Question

1. In what ways do certain animals have culture?

Answered: 1 week ago

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago