Question: 2. Write the SQL statements to answer the following queries using one statement per query. 2.1 Retrieve the first name, last name, and address of

2. Write the SQL statements to answer the following queries using one statement per query.

2.1 Retrieve the first name, last name, and address of all employees who work for the Administration department. 2.2 For each employee, retrieve the employees first and last name and the first name and last name of his or her immediate supervisor. 2.3 Show the resulting salaries if each employee working on the Newbenefits project is given a 50 percent increase. The result should show in such three columns: Lname, Fname, New_salary. 2.4 Retrieve salaries of all employees whose address is in Houston, Texas. Duplicates should be eliminated.

3. Write the SQL statements to complete the following modify operations using one statement per operation.

3.1 Update the hours attribute of the WORKS_ON tuple with Pno = 10 and Essn=999887777 to 5.0.

3.2 Insert a new tuple into EMPLOYEE table.

3.3 Delete the WORKS_ON tuples with Essn = 333445555

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!