db_id
stringclasses 140
values | question
stringlengths 16
224
| schema
stringclasses 140
values | summarized-schema
stringlengths 18
304
| shrink-score
float64 0
1
|
---|---|---|---|---|
hospital_1
|
What is the id of the appointment that started most recently?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
appointment : appointmentid (number) , start (time)
| 0.970588 |
hospital_1
|
List the name of physicians who took some appointment.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | appointment : physician (number)
| 0.955882 |
hospital_1
|
What are the names of all the physicians who took appointments.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | appointment : physician (number)
| 0.955882 |
hospital_1
|
List the name of physicians who never took any appointment.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | appointment : physician (number)
| 0.955882 |
hospital_1
|
Which physicians have never taken any appointment? Find their names.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | appointment : physician (number)
| 0.955882 |
hospital_1
|
Find the names of all physicians and their primary affiliated departments' names.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | department : name (text) , departmentid (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean)
| 0.897059 |
hospital_1
|
What are the name and primarily affiliated department name of each physician?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | department : name (text) , departmentid (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean)
| 0.897059 |
hospital_1
|
What is the name of the patient who made the most recent appointment?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | appointment : patient (number) , start (time)
| 0.941176 |
hospital_1
|
Find the name of the patient who made the appointment with the most recent start date.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | appointment : patient (number) , start (time)
| 0.941176 |
hospital_1
|
How many patients stay in room 112?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
stay : patient (number) , room (number)
| 0.970588 |
hospital_1
|
Count the number of patients who stayed in room 112.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
stay : patient (number) , room (number)
| 0.970588 |
hospital_1
|
How many patients' prescriptions are made by physician John Dorian?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : ssn (number) , employeeid (number) , name (text) | patient : ssn (number) , name (text) | prescribes : patient (number) , physician (number)
| 0.897059 |
hospital_1
|
Find the number of patients' prescriptions physician John Dorian made.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : ssn (number) , employeeid (number) , name (text) | patient : ssn (number) , name (text) | prescribes : patient (number) , physician (number)
| 0.897059 |
hospital_1
|
Find the name of medication used on the patient who stays in room 111?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | medication : name (text) , code (number) | prescribes : patient (number) , medication (number) | stay : patient (number) , room (number)
| 0.882353 |
hospital_1
|
What is the name of the medication used for the patient staying in room 111?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | medication : name (text) , code (number) | prescribes : patient (number) , medication (number) | stay : patient (number) , room (number)
| 0.882353 |
hospital_1
|
Find the patient who most recently stayed in room 111.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
stay : patient (number) , room (number) , staystart (time)
| 0.955882 |
hospital_1
|
What is the id of the patient who stayed in room 111 most recently?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
stay : patient (number) , room (number) , staystart (time)
| 0.955882 |
hospital_1
|
What is the name of the nurse has the most appointments?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text) , employeeid (number) | appointment : prepnurse (number) , appointmentid (number)
| 0.941176 |
hospital_1
|
Find the name of the nurse who has the largest number of appointments.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text) , employeeid (number) | appointment : prepnurse (number) , appointmentid (number)
| 0.941176 |
hospital_1
|
How many patients do each physician take care of? List their names and number of patients they take care of.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | patient : name (text) , pcp (number) , ssn (number)
| 0.926471 |
hospital_1
|
Return the name of each physician and the number of patients he or she treats.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | patient : name (text) , pcp (number) , ssn (number)
| 0.926471 |
hospital_1
|
Find the name of physicians who are in charge of more than one patient.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | patient : name (text) , pcp (number) , ssn (number)
| 0.926471 |
hospital_1
|
Which physicians are in charge of more than one patient? Give me their names.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | patient : name (text) , pcp (number) , ssn (number)
| 0.926471 |
hospital_1
|
Find the number of rooms located on each block floor.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
block : blockfloor (number) , blockcode (number) | room : blockfloor (number) , blockcode (number) , roomnumber (number)
| 0.926471 |
hospital_1
|
How many rooms does each block floor have?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
block : blockfloor (number) , blockcode (number) | room : blockfloor (number) , blockcode (number) , roomnumber (number)
| 0.926471 |
hospital_1
|
Find the number of rooms for different block code?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
block : blockcode (number) , blockfloor (number) | room : blockcode (number) , blockfloor (number) , roomnumber (number)
| 0.926471 |
hospital_1
|
How many rooms are located for each block code?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
block : blockcode (number) , blockfloor (number) | room : blockcode (number) , blockfloor (number) , roomnumber (number)
| 0.926471 |
hospital_1
|
What are the unique block codes that have available rooms?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
room : blockcode (number) , unavailable (boolean)
| 0.970588 |
hospital_1
|
Tell me the distinct block codes where some rooms are available.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
room : blockcode (number) , unavailable (boolean)
| 0.970588 |
hospital_1
|
How many different types of rooms are there?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
room : roomtype (text)
| 0.985294 |
hospital_1
|
Find the number of distinct room types available.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
room : roomtype (text)
| 0.985294 |
hospital_1
|
What is the names of the physicians who prescribe medication Thesisin?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | medication : name (text) , code (number) | prescribes : physician (number) , medication (number)
| 0.911765 |
hospital_1
|
List the names of all the physicians who prescribe Thesisin as medication.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | medication : name (text) , code (number) | prescribes : physician (number) , medication (number)
| 0.911765 |
hospital_1
|
Find the name and position of physicians who prescribe some medication whose brand is X?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , position (text) , employeeid (number) | medication : name (text) , code (number) , brand (text) | prescribes : physician (number) , medication (number)
| 0.882353 |
hospital_1
|
Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , position (text) , employeeid (number) | medication : name (text) , code (number) , brand (text) | prescribes : physician (number) , medication (number)
| 0.882353 |
hospital_1
|
Find the number of medications prescribed for each brand.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
medication : name (text) , code (number) , brand (text) | prescribes : medication (number) , physician (number)
| 0.926471 |
hospital_1
|
How many medications are prescribed for each brand?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
medication : name (text) , code (number) , brand (text) | prescribes : medication (number) , physician (number)
| 0.926471 |
hospital_1
|
Find the name of physicians whose position title contains the word 'senior'.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , position (text)
| 0.970588 |
hospital_1
|
What are the names of the physicians who have 'senior' in their titles.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , position (text)
| 0.970588 |
hospital_1
|
Find the patient who has the most recent undergoing treatment?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
undergoes : patient (number) , dateundergoes (time)
| 0.970588 |
hospital_1
|
Which patient is undergoing the most recent treatment?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
undergoes : patient (number) , dateundergoes (time)
| 0.970588 |
hospital_1
|
Find the names of all patients who have an undergoing treatment and are staying in room 111.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | stay : patient (number) , stayid (number) , room (number) | undergoes : patient (number) , stay (number)
| 0.897059 |
hospital_1
|
What are the names of patients who are staying in room 111 and have an undergoing treatment?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | stay : patient (number) , stayid (number) , room (number) | undergoes : patient (number) , stay (number)
| 0.897059 |
hospital_1
|
List the names of all distinct nurses ordered by alphabetical order?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text)
| 0.985294 |
hospital_1
|
What is the alphabetically ordered list of all the distinct names of nurses?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text)
| 0.985294 |
hospital_1
|
Find the names of nurses who are nursing an undergoing treatment.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text) , employeeid (number) | undergoes : assistingnurse (number)
| 0.955882 |
hospital_1
|
Which nurses are in charge of patients undergoing treatments?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text) , employeeid (number) | undergoes : assistingnurse (number)
| 0.955882 |
hospital_1
|
List the names of all distinct medications, ordered in an alphabetical order.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
medication : name (text)
| 0.985294 |
hospital_1
|
What is the alphabetically ordered list of all distinct medications?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
medication : name (text)
| 0.985294 |
hospital_1
|
What are the names of the physician who prescribed the highest dose?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | prescribes : physician (number) , dose (text)
| 0.941176 |
hospital_1
|
Find the physician who prescribed the highest dose. What is his or her name?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | prescribes : physician (number) , dose (text)
| 0.941176 |
hospital_1
|
List the physicians' employee ids together with their primary affiliation departments' ids.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean)
| 0.955882 |
hospital_1
|
What are each physician's employee id and department id primarily affiliated.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean)
| 0.955882 |
hospital_1
|
List the names of departments where some physicians are primarily affiliated with.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
department : name (text) , departmentid (number) | affiliated_with : department (number) , primaryaffiliation (boolean)
| 0.941176 |
hospital_1
|
What are the names of departments that have primarily affiliated physicians.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
department : name (text) , departmentid (number) | affiliated_with : department (number) , primaryaffiliation (boolean)
| 0.941176 |
hospital_1
|
What nurses are on call with block floor 1 and block code 1? Tell me their names.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
on_call : nurse (number) , blockfloor (number) , blockcode (number)
| 0.955882 |
hospital_1
|
Find the ids of the nurses who are on call in block floor 1 and block code 1.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
on_call : nurse (number) , blockfloor (number) , blockcode (number)
| 0.955882 |
hospital_1
|
What are the highest cost, lowest cost and average cost of procedures?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : cost (number)
| 0.985294 |
hospital_1
|
Tell me the highest, lowest, and average cost of procedures.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : cost (number)
| 0.985294 |
hospital_1
|
List the name and cost of all procedures sorted by the cost from the highest to the lowest.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : name (text) , cost (number)
| 0.970588 |
hospital_1
|
Sort the list of names and costs of all procedures in the descending order of cost.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : name (text) , cost (number)
| 0.970588 |
hospital_1
|
Find the three most expensive procedures.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : name (text) , cost (number)
| 0.970588 |
hospital_1
|
What are the three most costly procedures?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : name (text) , cost (number)
| 0.970588 |
hospital_1
|
Find the physicians who are trained in a procedure that costs more than 5000.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , code (number) , cost (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
Which physicians are trained in procedures that are more expensive than 5000?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , code (number) , cost (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
Find the physician who was trained in the most expensive procedure?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , code (number) , cost (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
Which physician was trained in the procedure that costs the most.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , code (number) , cost (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
What is the average cost of procedures that physician John Wen was trained in?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : cost (number) , code (number) , name (text) | trained_in : physician (number) , treatment (number) | physician : employeeid (number) , name (text)
| 0.897059 |
hospital_1
|
Compute the mean price of procedures physician John Wen was trained in.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
procedures : cost (number) , code (number) , name (text) | trained_in : physician (number) , treatment (number) | physician : employeeid (number) , name (text)
| 0.897059 |
hospital_1
|
Find the names of procedures which physician John Wen was trained in.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , code (number) | trained_in : physician (number) , treatment (number)
| 0.911765 |
hospital_1
|
What are the names of procedures physician John Wen was trained in?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , code (number) | trained_in : physician (number) , treatment (number)
| 0.911765 |
hospital_1
|
Find all procedures which cost more than 1000 or which physician John Wen was trained in.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , cost (number) , code (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
What are the procedures that cost more than 1000 or are specialized in by physician John Wen?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , cost (number) , code (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , cost (number) , code (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , cost (number) , code (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , cost (number) , code (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
What procedures cost less than 5000 and have John Wen as a trained physician?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | procedures : name (text) , cost (number) , code (number) | trained_in : physician (number) , treatment (number)
| 0.897059 |
hospital_1
|
Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | department : name (text) , departmentid (number) | affiliated_with : physician (number) , department (number)
| 0.911765 |
hospital_1
|
Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | department : name (text) , departmentid (number) | affiliated_with : physician (number) , department (number)
| 0.911765 |
hospital_1
|
Find the name of physicians who are affiliated with Surgery or Psychiatry department.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | department : name (text) , departmentid (number) | affiliated_with : physician (number) , department (number)
| 0.911765 |
hospital_1
|
Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
physician : name (text) , employeeid (number) | department : name (text) , departmentid (number) | affiliated_with : physician (number) , department (number)
| 0.911765 |
hospital_1
|
Find the names of patients who are not using the medication of Procrastin-X.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | medication : name (text) , code (number) | prescribes : patient (number) , medication (number)
| 0.911765 |
hospital_1
|
What are the names of patients who are not taking the medication of Procrastin-X.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
patient : name (text) , ssn (number) | medication : name (text) , code (number) | prescribes : patient (number) , medication (number)
| 0.911765 |
hospital_1
|
Find the number of patients who are not using the medication of Procrastin-X.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
prescribes : patient (number) , medication (number) , physician (number) | patient : ssn (number) , name (text) | medication : code (number) , name (text)
| 0.897059 |
hospital_1
|
How many patients are not using Procrastin-X as medication?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
prescribes : patient (number) , medication (number) , physician (number) | patient : ssn (number) , name (text) | medication : code (number) , name (text)
| 0.897059 |
hospital_1
|
How many appointments are there?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
appointment : appointmentid (number)
| 0.985294 |
hospital_1
|
Count how many appointments have been made in total.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
appointment : appointmentid (number)
| 0.985294 |
hospital_1
|
Find the names of nurses who are on call.
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text) , employeeid (number) | on_call : nurse (number)
| 0.955882 |
hospital_1
|
What are the distinct names of nurses on call?
|
physician : employeeid (number) , name (text) , position (text) , ssn (number) | department : departmentid (number) , name (text) , head (number) | affiliated_with : physician (number) , department (number) , primaryaffiliation (boolean) | procedures : code (number) , name (text) , cost (number) | trained_in : physician (number) , treatment (number) , certificationdate (time) , certificationexpires (time) | patient : ssn (number) , name (text) , address (text) , phone (text) , insuranceid (number) , pcp (number) | nurse : employeeid (number) , name (text) , position (text) , registered (boolean) , ssn (number) | appointment : appointmentid (number) , patient (number) , prepnurse (number) , physician (number) , start (time) , end (time) , examinationroom (text) | medication : code (number) , name (text) , brand (text) , description (text) | prescribes : physician (number) , patient (number) , medication (number) , date (time) , appointment (number) , dose (text) | block : blockfloor (number) , blockcode (number) | room : roomnumber (number) , roomtype (text) , blockfloor (number) , blockcode (number) , unavailable (boolean) | on_call : nurse (number) , blockfloor (number) , blockcode (number) , oncallstart (time) , oncallend (time) | stay : stayid (number) , patient (number) , room (number) , staystart (time) , stayend (time) | undergoes : patient (number) , procedures (number) , stay (number) , dateundergoes (time) , physician (number) , assistingnurse (number)
|
nurse : name (text) , employeeid (number) | on_call : nurse (number)
| 0.955882 |
ship_mission
|
How many ships are there?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : ship_id (number)
| 0.916667 |
ship_mission
|
What is the number of ships?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : ship_id (number)
| 0.916667 |
ship_mission
|
List the name of ships in ascending order of tonnage.
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : name (text) , tonnage (number)
| 0.833333 |
ship_mission
|
what are the names of the ships ordered by ascending tonnage?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : name (text) , tonnage (number)
| 0.833333 |
ship_mission
|
What are the type and nationality of ships?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : type (text) , nationality (text)
| 0.833333 |
ship_mission
|
What are the types and nationalities of every ship?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : type (text) , nationality (text)
| 0.833333 |
ship_mission
|
List the name of ships whose nationality is not "United States".
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : name (text) , nationality (text)
| 0.833333 |
ship_mission
|
What are the names of the ships that are not from the United States?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : name (text) , nationality (text)
| 0.833333 |
ship_mission
|
Show the name of ships whose nationality is either United States or United Kingdom.
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : name (text) , nationality (text)
| 0.833333 |
ship_mission
|
What are the names of the ships that are from either the US or the UK?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : name (text) , nationality (text)
| 0.833333 |
ship_mission
|
What is the name of the ship with the largest tonnage?
|
mission : mission_id (number) , ship_id (number) , code (text) , launched_year (number) , location (text) , speed_knots (number) , fate (text) | ship : ship_id (number) , name (text) , type (text) , nationality (text) , tonnage (number)
|
ship : name (text) , tonnage (number)
| 0.833333 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.