Answered step by step
Verified Expert Solution
Link Copied!

Question

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 to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago