You are on page 1of 2

Consider following ER Diagram. Based on following ER Diagram, answer following question.

a. Identify and list all attributes of each table with their appropriate data type (referring to mysql
syntax). Also mention the foreign key and their corresponding key in bracket.
b. Write DDL statement to create each table.
c. Write DML statement to insert at least 2 values in each table.
d. Write DML statement for following Select queries.
a. List all the patient who had examined in the date 2019/03/06.
b. List the name of hospital who has doctor named “Ram Hari Shakya”.
c. List the name of doctor who checked the patient named “Kum Bahadur Aryal”.
d. List all the doctor working on Dharan.
e. List the record of patient who was checked by doctor having qualification of “MD”.
f. List the problems of patient who was checked by doctor having salary greater than
50000.
g. Display the salary expense of Salandy Hospital.
h. Display the name of doctor having highest salary.
i. Display the name of hospital which has a doctor with 2 nd highest salary.
j. Display the name of hospital with most and least number of patient.
k. Display the name of hospital along with the number of patient in each hospital.
l. Display the name of hospital along with the number of record in each hospital.
m. Display total number of medical record for each day from ‘2021-1-11’ between ‘2021-1-
21’.

You might also like