All pastes #2120962 Raw Edit

Something

public text v1 · immutable
#2120962 ·published 2012-02-23 04:18 UTC
rendered paste body
 Consider the following table

 

1) Patient  (Patient_no,patient_name, p_add,p_birth_date,p_phone)

2) Room (Room_id, Room_type room_rate)

3) Doctor (doc_id,doc_name,doc_add,doc_type,doc_mobile)

3) Patient_transaction_table (patient_no,doc_id,room_id,patient_admit_date,patient_dischage_date,

     total_room_charges,treatment_name,tretmenat_charge,total_bill_amout)

 

Solve the following queries based on above tables

Create above four tables with proper constraints (primary key, foreign key etc) 

insert appropriate data in the above tables( Add minimum 5 records in each table) 

Display all patient details who are taking the treatment under the doctor LELE. 

List all the doctors who are visiting. 

Display all patient details whose total_bill_amout is greather than 20000 Rs. 

Count total doctors those who are visiting. 

Display all patient details those who are more than 10 days in hospital. 

List all patient who are admitted today.