Question: Using the database snapshot from the COMPANY database, provide the data output for the following SQL retrieval commands: (a) SELECT EMPLOYEE.FName, EMPLOYEE.LName, EMPLOYEE.BirthDate, EMPLOYEE.Gender FROM

Using the database snapshot from the COMPANY database, provide the data output for the following SQL retrieval commands:
(a) SELECT EMPLOYEE.FName, EMPLOYEE.LName, EMPLOYEE.BirthDate, EMPLOYEE.Gender
FROM EMPLOYEE, DEPARTMENT
WHERE DEPARTMENT.DName=Research AND DEPARTMENT.DNumber=EMPLOYEE.DNO;
(b) SELECT PNumber, DNum, LName, Address, BirthDate
FROM PROJECTS, DEPARTMENT, EMPLOYEE
WHERE DNum=DNumber AND Mgr_SSN=SSN AND PLocation in (Houston,Stafford);
(c) SELECT *
FROM EMPLOYEE, DEPARTMENT;
(d) (SELECT DISTINCT PNumber
FROM PROJECTS, DEPARTMENT, EMPLOYEE
WHERE DNum=DNumber AND Mgr_SSN=SSN AND FName=James)
UNION ALL
(SELECT DISTINCT PNumber
FROM PROJECTS, WORKS_ON, EMPLOYEE
WHERE PNumber=PNO AND ESSN=SSN AND FName=James)
 Using the database snapshot from the COMPANY database, provide the data

EMPLOYEE Frame Minit Lname Ssn Bdate Address Sex Salary Super_ssn Dno John B Smith 1234567891965-01-09 731 Fondren, Houston, TX M 30000 333445555 5 Franklin T Wong 333445555 1955-12-08 638 Voss, Houston, TX M 40000 888665555 5 Alicia Zelaya 999887777 1968-01-19 3321 Castle, Spring, TX F 25000 987654321 4 Jennifer S Wallace 9876543211941-06-20 291 Berry, Bellaire, TX F 43000 888665555 4 Ramesh K Narayan 666884444 1962-09-15 975 Fire Oak, Humble, TX M 38000 333445555 5 Joyce A English 453453453 1972-07-31 5631 Rice, Houston, TX F 25000 333445555 5 Ahmad V Jabbar 987987987 1969-03-29 980 Dallas, Houston, TX M 25000 987654321 4 James E Borg 888665555 1937-11-10450 Stone, Houston, TXM 55000 NULL 1 DEPARTMENT Dname Research Administration Headquarters Dnumber 5 Mgr_ssn 333445555 987654321 888665555 Mgr_start_date 1988-05-22 1995-01-01 1981-06-19 4 DEPT_LOCATIONS Dnumber Dlocation 1 Houston Stafford 5 Bellaire 5 Sugarland 5 Houston 1 WORKS ON Esan Pno Pnumber Dnum 5 1 1 123456789 123456789 Hours 32.5 7.5 40.0 2 PROJECT Pname ProductX ProductY Productz Computerization Reorganization Newbenefits 2 3 Plocation Bellaire Sugarland Houston Stafford Houston Stafford 5 5 3 1 10 4 2 20.0 20.0 10.0 1 20 30 2 4 10.0 3 10 10.0 20 10.0 666884444 453453453 453453453 333445555 333445555 333445555 333445555 999887777 999887777 987987987 987987987 987654321 987654321 888665555 30 10 DEPENDENT Essn 333445555 333445555 333445555 987654321 30.0 10.0 35.0 5.0 20.0 Dependent_name Sex Alice F Theodore M F 10 Joy Bdate Relationship 1988-04-05 Daughter 1983-10-25 Son 1958-05-03 Spouse 1942-02-28 Spouse 1988-01-04 Son 1988-12-30 Daughter 1967-05-05 Spouse 30 Abner 30 123456789 Michael 20 15.0 F 123456789 123456789 Alice Elizabeth 20 NULL F

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!