Question: Please provide the SQL queries for the following. List the patient number, name and bed number for every patient together with the name of the

Please provide the SQL queries for the following.

  1. List the patient number, name and bed number for every patient together with the name of the medical doctor who is the reference for every patient.
  1. Find the name and number for every patient who has diabetes of type 1, who does not have allergies and who does not have heart disease.
  1. List the patient number and the patient name for every patient who has symptoms related to pain (or every patient who has pain symptom) and fatigue. PLEASE USE ONLY SUBQUERIES TO ANSWER THIS.
  1. Find the name of Oren Koules manager.
  1. List every patient number, patient name, the average quantity of items consumed by every patient.
  1. The chairman of the hospital would like to have the name of every manager who manages more than 2 employees.
  1. List the name of every patient who spent more money than the average of expense (spending) of all patients of the hospital.

  1. List the patient number and the patient name for every patient that consumes at least 2 items.

I think most of the tables that are necessary and needed are the ones I screenshotted. Let me know If i have any missing tables. Sorry I just couldn't fit all of them in one page.

Please provide the SQL queries for the following. List the patient number,

TREATMENT PATIENT NO PHYSICIANID TREATMENT DATE TREATMENT TIME RESULTS TEM ITEM NO - PHYSICIAN PHYSICIAN ID UNIT COST PATIENT HEALTH PROBLEM CONSUMES PATIENTNO PATIENT NAME BED NO PHYSICIAN ID - PATIENT NO ITEMNO QUANTITY TOTAL COST DATE PB DESCRIPTION - MEDICAL HISTORY HISTORY PATIENT NO BLOOD PRESSURE DIABETES ALLERGIES HEART DISEASE DIAGNOSIS OCCURS APPO ID PB ID SYMD 2 PB ID BED BED NGO EMPLOYEE EMP NO SYMPTOM 9 SYM ID ROOM NO WARD NO EMP NAME BOSS NO SYM NAME TREATMENT PATIENT NO PHYSICIANID TREATMENT DATE TREATMENT TIME RESULTS TEM ITEM NO - PHYSICIAN PHYSICIAN ID UNIT COST PATIENT HEALTH PROBLEM CONSUMES PATIENTNO PATIENT NAME BED NO PHYSICIAN ID - PATIENT NO ITEMNO QUANTITY TOTAL COST DATE PB DESCRIPTION - MEDICAL HISTORY HISTORY PATIENT NO BLOOD PRESSURE DIABETES ALLERGIES HEART DISEASE DIAGNOSIS OCCURS APPO ID PB ID SYMD 2 PB ID BED BED NGO EMPLOYEE EMP NO SYMPTOM 9 SYM ID ROOM NO WARD NO EMP NAME BOSS NO SYM NAME

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!