Answered step by step
Verified Expert Solution
Question
1 Approved Answer
EMPLOYEEWrite SQL queries to answer the following questions: Retrieve the name and manager's SSN of each department. Retrieve the names of employees whose supervisor's SSN
EMPLOYEEWrite SQL queries to answer the following questions:
Retrieve the name and manager's SSN of each department.
Retrieve the names of employees whose supervisor's SSN is ;
Retrieve the last name and address of female employees who work for department
Retrieve the average salary, minimum salary of employees in department
For each employee who have dependents, list hisher SSN and the number of
dependents heshe has.
Retrieve the first names and last names of employees whose last names start with
Retrieve the project number of each project along with the number of employees
working on it
For each employee with more than one dependent, list hisher name and the total
number of dependents heshe has.
Retrieve the number of distinct employees that have dependents.
Retrieve the names of employees who work on the project with pno
extra credit For each department with at least two locations, retrieve the department
number along with its locations.
DEPARTMENT
DEPTLOCATIONSWORKSON
tableEssnPno,HoursNULL
PROJECT
tablePnamePnumber,Plocation,DnumProductXBellaire,ProductYSugarland,ProductZHouston,ComputerizationStafford,ReorganizationHouston,NewbenefitsStafford,
DEPENDENT
tableEssnDependentname,Sex,Bdate,RelationshipAlice,FDaughterTheodore,MSonJoy,FSpouseAbner,MSpouseMichael,MSonAlice,FDaughterElizabeth,FSpouse
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started