Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Question 4: (12 Marks) Given the following schema: Doctor(DID, Dname, Specialty) Patient(Pid, Pname, Age, Weight) Diagnose(PID, DID, date, description) Prescription(PID, MId, date, comment) Medicine (Mid,

image text in transcribed

Question 4: (12 Marks) Given the following schema: Doctor(DID, Dname, Specialty) Patient(Pid, Pname, Age, Weight) Diagnose(PID, DID, date, description) Prescription(PID, MId, date, comment) Medicine (Mid, MName, type) Write down the following queries in SQL: 1. List the doctors who are specialist in Diabetes. 2. List the patients of Dr. Mshari 3. Retrieve the patients who were diagnosed by Dr. Mshari and Dr. Ghamdi 4. Retrieve all the medicine that were taken by Fadh Zahrani before 10/4/2016 and prescribed before 1/4/2016 5. Retrieve the number of patients who were diagnosed by Dr. Mshari before the 10/5/2016 6. List for each specialty and for each doctor the number of patient who were diagnosed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions