Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the attached ERD, write a series of queries in a plain . txt file that answer the following questions: 1 . Give a distinct

Given the attached ERD, write a series of queries in a plain .txt file that answer the following questions:
1. Give a distinct list of medications that have ever been prescribed.
2. Give a distinct list of physician names, and the medication they have prescribed
3. Give a list of medicine names and instructions for all prescriptions for patient ID 1
4. Give a list of medicine names, and the number of times they have been prescribed.
5. Give a list of medicine names that have never been prescribed.
6. Give a list of names of patients who have been prescribed a medicine, but have never had to an appointment.
Sent from my iPhone
7. Give a distinct list of patients and the doctor they saw, but only when the doctor is not their primary doctor (patients.doctor_id indicates primary doctor).
image text in transcribed

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

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