Question: Write SQL for each one of the question 1. Produce table Answer01 (ID, SSN) which contains all the employees whose last name is in the

 Write SQL for each one of the question 1. Produce table

Write SQL for each one of the question

1. Produce table Answer01 (ID, SSN) which contains all the employees whose last name is in the database.

2. Produce table Answer02 (ID) which contains in descending sorted order all the employees who do not have children.

3. Produce table Answer03 (ID, Child Name) which contains all the managers and their childrens names.

4. Produce table Answer04 (FNAME) which contains in descending sorted order all the employees first names for employees who are either engineers or managers. Keep both (or more) records if two (or more) employees have the same first name.

5. Produce table Answer05 (HEIGHT) which contains the average height of all the children who are taller than 160 cm.

6. Produce table Answer06 (ID1, ID2) which contains all the pairs of managers who hate each other. Sort the result by ascending by ID1 but descending by ID2.

7. Produce table Answer07 (PIN1, PIN2) which contains all the pairs of prototypes PIN1 has completion date later than the completion date of prototype with PIN2.

8. Produce table Answer08 (ID) which contains all the Eng techs who create products that include all the products created by Eng tech with id = 0000000018.

9. Produce table Answer09 (Parent ID, Number Of Children) which contains that the em- ployees who have at least 2 children with height less than 170 cm and the number of these children. Your query should work if 2 were replaced with 200.

PHONE EMPLOYEE CHILD PK PK,FK1 ID PK,FK1 NAME PK ID PK,FK1 LD PK SSN FNAME LNAME DOB NAME HEIGHT CREATES ENG TECH PK,FK1PRODUCTID PK,FK1ID MANAGER PK,FK1 ID FK2 HATERID DESIGNS PK,FK2 ID PK,FK1 PIN PRODUCT PK I PRODUCT!D NAME ENGINEER TECHNICIAN PK,FK1ID PK,FK1ID COMPLETIONDATE PROTOTYPE PK PIN FK1 PRODUCTID COMPLETIONDATE

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!