Course Solutions Uncategorized (Solved) : Consider Following Relations Patients Pid Name Address Telephone Carecentreid Carecentres Q30693741 . . . .

(Solved) : Consider Following Relations Patients Pid Name Address Telephone Carecentreid Carecentres Q30693741 . . . .

 

Consider the following relations:

Patients(pid, name, address, telephone, care_centre_id)

Care_centres(cid, name, location, nurse_charge_id)

Treatments(tid, patient_id, physician_id, treatment_name,date)

Nurses(nid, name, care_centre_id, certificate_type, telephone,salary)

Physicians(phid, name, pager_number, specialization,salary).

For some strategic decisions, the president of the hospitalneeds summary data about the care centres. For each care centre,s/he needs to know the number of nurses holding an RN certificate,as well as their total and average salaries. Does the followingview answer the president’s request? If not, write the correct viewthat will satisfy the president’ s request.

CREATE VIEW NURSE_SUMMARY (D, C,TOTAL_S, AVERAGE_S)

AS SELECT cid, COUNT (*), SUM(salary), AVG (salary)

FROM Care_centres, Nurses

WHERE nurse_charge_id = nid andcertificate_type like ‘RN’

GROUP

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Answered) : Dyson specializes in repairing vacuum cleaners. Dyson receives weekly deliveries from its vacuum cleaner belt supplier, who r(Answered) : Dyson specializes in repairing vacuum cleaners. Dyson receives weekly deliveries from its vacuum cleaner belt supplier, who r

Dyson specializes in repairing vacuum cleaners. Dyson receives weekly deliveries from its vacuum cleaner belt supplier, who replenishes belts up to a level that Dyson appliance is free to specify. Dyson buys