Question: Here is the schema: 1) Using SQL's INSERT command, insert a new employee using the following data: (2 points) Fname=Richard; Minit=K:Lname=Marini:SSN=653298653;Bdate='12- DEC-63; Address=98 Oak forest,


Here is the schema:

1) Using SQL's INSERT command, insert a new employee using the following data: (2 points) Fname=Richard; Minit=K:Lname=Marini:SSN=653298653;Bdate='12- DEC-63; Address=98 Oak forest, Katy, TX:Sex=M:Salary=37000;Super_ssn=987654321; Dno=1 Hand in the INSERT command and show the updated content of the EMPLOYEE table to ensure that the employee was inserted successfully. 2) Using SQL's UPDATE command, write a single UPDATE command to decrease the number of hours of all employees who work on project number 1 or project number 10 by 2 hours. (2 points) Hand in the UPDATE command and show the updated content of the WORKS ON table to ensure that the update was done successfully. 3) Use SQL's DELETE command to delete all entries in the WORKS_ON table with Pno=30. (2 points) Hand in the DELETE command and show the updated content of the WORKS_ON table to ensure that the entries were deleted successfully. 4) Write an SQL query that uses a LEFT OUTER JOIN to show the first name of the employee and the name of the department he/she manages. (2 points) Hand in the query command and the output to make sure that, in addition to mangers, non-managers are also listed. 5) Write an SQL query that uses GROUP BY to show the social security number of the employee and the number of dependents he/she has ordered by the number of dependents in ascending order. That is, the query should produce the following output: (2 points) SOCIAL_SECURITY_NUMBER NUMBER_OF_DEPENDENTS 987654321 123456789 333445555 1 3 3 Hand in the query command and the output to make sure that it produces the above output Figure 5.6 One possible database state for the COMPANY relational database schema. Dno EMPLOYEE Fname Minit John B Franklin T 5 5 Alicia 4 S 4 Lname San Bdate Address Sex Salary Super_ssn Smith 123456789 1965-01-09 731 Fondren, Houston, TX M 30000 333445555 Wong 333445555 1955-12-08 638 Voes, Houston, TX M 40000 888665555 Zelaya 999887777 1968-01-19 3321 Castle, Spring, TX F 25000 987654321 Wallace | 987654321 1941-06-20 291 Berry, Bellaire, TX F 43000 888665555 Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TXM 38000 333445555 English 453453453 1972-07-31 5631 Rice, Houston, TX F 25000 333445555 Jabbar 987987987 1969-03-29 980 Dallas, Houston, TX M 25000 987654321 Borg 888665555 1937-11-10 450 Stone, Houston, TX M 55000 NULL Jennifer Ramesh Joyce Ahmad ID 0 -
Step by Step Solution
There are 3 Steps involved in it
Lets go through each question stepbystep 1 Insert a New Employee SQL Command sql INSERT INTO EMPLOYE... View full answer
Get step-by-step solutions from verified subject matter experts
