Question: plzzzzzzz helllllp meeee pllllzzzzzzzzz !!! database ... Query Implementation: Here give out the SQL views and queries. For each one; write the view/query statement that
plzzzzzzz helllllp meeee pllllzzzzzzzzz !!!
database ...
Query Implementation:
Here give out the SQL views and queries. For each one; write the view/query statement that you selected then write its SQL solution.
1- Retrieve the names of companies who haven't manufactured any drugs. (This is an Example)
SELECT Cname
FROM Company
WHERE NOT EXISTS ( SELECT *
FROM Drug
WHERE Cname=PCname);

You have to create two views and eight queries. Choose them from the list then indicate their implementation and results. Note: The values on the blue color can be change according to the entered data
Use the Create View statement to create the following views:
Employees-Hired: This view returns the First Name, Last Name, and Date Hired of all Hospital Employees.
NursesInCharge: This view returns the name of the Nurse in Charge for each Care Center along with the phone number of the Nurse.
GoodTechnician: This view returns all the Technicians how have at least one skill.
CareCenter-Beds: This view returns the name for each Care Center along with the number of beds that are assigned to patients (occupied beds), the number of beds not assigned to patients (free beds), and the total number of beds.
OutPatientsNotVisited: This view returns all OutPatients who have not been visited by a Physician yet.
Answer the following Queries. Feel free to use any of the views that you will create in part (a):
For each Job Class list all the staff members belonging to this class.
Find all Volunteers who do not have any skills.
List all Patients who are also Volunteers at the Hospital.
Find each Outpatient who has been visited exactly once.
For each Skill list the total number of volunteers and technicians that achieve this skill.
Find all Care Centers where every bed is assigned to a Patient (i.e. no beds are available).
List all Nurses who have an RN certificate but are not in charge of a Care Center.
List all Nurses that are in charge of a Care Center to which they are also assigned.
List all Laboratories, where all assigned technicians to that laboratory achieve at least one skill.
List all Resident patients that were admitted after the most current employee hire date.
Find all Patients who have been admitted within one week of their Contact_Date.
List all Physicians who have made more than 3 visits on a single day.
City PnameDoB Zip_Code Phone PERSON EMPLOYEE PHYSICIAN PATIENT Contact DateVOLUNTEER Mobile 1RESPONSIBLEN FOR lob_Class Tech Skill Date Admitted NURSE STAFF TECHNICIAN RESIDENT OUTPATIENT SCHEDULED VISIT WORKS IN LABORATORY RN NURSE Lab NameLab Location IN CHARGE ASSIGNED TO Bed ID Room numm EER Diagram for Healthway Hospital CARE_CENTER CONTAINS BED PROVIDED CC Location City PnameDoB Zip_Code Phone PERSON EMPLOYEE PHYSICIAN PATIENT Contact DateVOLUNTEER Mobile 1RESPONSIBLEN FOR lob_Class Tech Skill Date Admitted NURSE STAFF TECHNICIAN RESIDENT OUTPATIENT SCHEDULED VISIT WORKS IN LABORATORY RN NURSE Lab NameLab Location IN CHARGE ASSIGNED TO Bed ID Room numm EER Diagram for Healthway Hospital CARE_CENTER CONTAINS BED PROVIDED CC Location
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
