Question: i created all the table and insert data in each table in sql , but I have the Question under the tables. Table 1: Employee

i created all the table and insert data in each table in sql , but I have the Question under the tables.

Table 1: Employee

Employee_name Street City
William Gates III University St Redmond
Warren Buffett Alaskan Way

Omaha

Table 2: Works

Employee_name Company_name Salary
William Gates III Microsoft 1400000
Warren Buffett Exxon Mobil 230000

Table 3: Company

Company_name City
Microsoft Redmond
Exxon Mobil Omaha

Table 4: Manages

Employee_name Manager_name
Paul Allen William Gates III
Carlos Slim Helu Lakshmi Mittal

I have created and insert queries :

Questions:

1- Find the name of managers that have their salary smaller than some of the employee they manage.

2- Find the name of the managers and the average salary of the employees they manage.

3 Display the employee names and their corresponding street without any digits in the street name. For

instance for Prince Gatlin display nd Ave. In addition make sure you trim any leading spaces.

4- Give all employees of Facebook a 10 percent raise if their salary is less than $100,000 and 5 percent

raise otherwise.

thank you..

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!