Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please provide the SQL queries for the following. 5. List every patient number, patient name, the average quantity of items consumed by every patient. 6.

Please provide the SQL queries for the following.

5. List every patient number, patient name, the average quantity of items consumed by every patient.

6. The chairman of the hospital would like to have the name of every manager who manages more than 2 employees.

7. List the name of every patient who spent more money than the average of expense (spending) of all patients of the hospital.

8. 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.

image text in transcribed

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

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

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions