) Create a query that returns a list of all patients and their family member (add a column primary member id in the patient table; make one patient as the primary member and then create another column called relationship and add husband, wife, son, daughter etc.)

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter1: Overview Of Database Concepts
Section: Chapter Questions
Problem 14MC: A unique identifier for a data row that consists of more than one field is commonly called...
icon
Related questions
Question

Hi, can you please make a query in MySQL based on the given image (Query number 8)? Thank you so much and have great day!

Information
Table: patients
Columns:
int PK
varchar(45)
varchar(45)
varchar(45)
varchar(45)
varchar(45)
varchar(45)
varchar(45)
varchar(45)
varchar(45)
varchar(45)
varchar(45)
patientID
firstName
lastName
phoneNumber
emailAddress
unit
streetAddress
province
country
city
postalcode
healthInformation
typeofPatient
healthCoverage
Doctors_doctorID
Reports_patientID int
Secretaries_ID
MemberHeadId
Relationship
varchar(45)
int
int
int
varchar(45)
Object Info Session
Transcribed Image Text:Information Table: patients Columns: int PK varchar(45) varchar(45) varchar(45) varchar(45) varchar(45) varchar(45) varchar(45) varchar(45) varchar(45) varchar(45) varchar(45) patientID firstName lastName phoneNumber emailAddress unit streetAddress province country city postalcode healthInformation typeofPatient healthCoverage Doctors_doctorID Reports_patientID int Secretaries_ID MemberHeadId Relationship varchar(45) int int int varchar(45) Object Info Session
8) Create a query that returns a list of all patients and their family member
(add a column primary member id in the patient table; make one patient
as the primary member and then create another column called
relationship and add husband, wife, son, daughter etc.)
Transcribed Image Text:8) Create a query that returns a list of all patients and their family member (add a column primary member id in the patient table; make one patient as the primary member and then create another column called relationship and add husband, wife, son, daughter etc.)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning