Question: 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) , employeeid (number)


Question: 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) , employeeid (number)


Question: 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) , patient (number)


Question: 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) , patient (number)


Question: 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) , code (number)


Question: 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) , code (number)


Question: 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)


Question: 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)


Question: 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) | physician : employeeid (number) | department : departmentid (number)


Question: 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) | physician : employeeid (number) | department : departmentid (number)


Question: 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) , physician (number)


Question: 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) , physician (number)


Question: 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) | nurse : employeeid (number)


Question: 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) | nurse : employeeid (number)


Question: 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) , code (number)


Question: 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) , code (number)


Question: 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) , code (number)


Question: 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) , code (number)


Question: 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) , code (number)


Question: 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) , code (number)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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) , physician (number)


Question: 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) , physician (number)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: 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) , ship_id (number)


Question: What is the ship with the largest amount of tonnage called?

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) , ship_id (number)


Question: Show different types of ships and the number of ships of each type.

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)


Question: For each type, 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)


Question: Please show the most common type 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)


Question: What is the most common type 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)


Question: List the nations that have more than two 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 : nationality (text) , ship_id (number)


Question: What are the nations that have more than two 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 : nationality (text) , ship_id (number)


Question: Show different types of ships and the average tonnage of ships of each type.

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) , tonnage (number) , ship_id (number)


Question: For each type, what is the average 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 : type (text) , tonnage (number) , ship_id (number)


Question: Show codes and fates of missions, and names of ships involved.

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)

mission : code (text) , fate (text) , ship_id (number) , mission_id (number) | ship : name (text) , ship_id (number)


Question: What are the mission codes, fates, and names of the ships involved?

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)

mission : code (text) , fate (text) , ship_id (number) , mission_id (number) | ship : name (text) , ship_id (number)


Question: Show names of ships involved in a mission launched after 1928.

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) , ship_id (number) | mission : ship_id (number) , launched_year (number) , mission_id (number)


Question: What are the names of ships that were involved in a mission launched after 1928?

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) , ship_id (number) | mission : ship_id (number) , launched_year (number) , mission_id (number)


Question: Show the distinct fate of missions that involve ships with nationality "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)

mission : fate (text) , ship_id (number) , mission_id (number) | ship : ship_id (number) , nationality (text)


Question: What are the different fates of the mission that involved ships 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)

mission : fate (text) , ship_id (number) , mission_id (number) | ship : ship_id (number) , nationality (text)


Question: List the name of ships that are not involved in any mission

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) , ship_id (number) | mission : ship_id (number) , mission_id (number)


Question: What are the names of the ships that are not involved in any missions?

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) , ship_id (number) | mission : ship_id (number) , mission_id (number)


Question: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.

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) , tonnage (number) , ship_id (number)


Question: What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?

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) , tonnage (number) , ship_id (number)


Question: Find the number of students in total.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)


Question: How many students are there?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)


Question: Find the last names of students studying in room 111.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : lastname (text) , classroom (number)


Question: What are the last names of students in room 111?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : lastname (text) , classroom (number)


Question: Find the first names of students studying in room 108.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , classroom (number) , lastname (text)


Question: What are the first names of students in room 108?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , classroom (number) , lastname (text)


Question: What are the first names of students studying in room 107?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , classroom (number) , lastname (text)


Question: List the first names of all the students in room 107.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , classroom (number) , lastname (text)


Question: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : classroom (number) , grade (number) , lastname (text)


Question: What are the grade number and classroom number of each class in the list?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : classroom (number) , grade (number) , lastname (text)


Question: Which grade is studying in classroom 103?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : grade (number) , classroom (number) , lastname (text)


Question: Find the grade taught in classroom 103.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : grade (number) , classroom (number) , lastname (text)


Question: Find the grade studying in room 105.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : grade (number) , classroom (number) , lastname (text)


Question: Which grade is studying in room 105?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : grade (number) , classroom (number) , lastname (text)


Question: Which classrooms are used by grade 4?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : classroom (number) , grade (number) , lastname (text)


Question: Find the classrooms in which grade 4 is studying.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : classroom (number) , grade (number) , lastname (text)


Question: Which classrooms are used by grade 5?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : classroom (number) , grade (number) , lastname (text)


Question: Show me the classrooms grade 5 is using.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : classroom (number) , grade (number) , lastname (text)


Question: Find the last names of the teachers that teach fifth grade.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : lastname (text) , classroom (number) , grade (number) | teachers : lastname (text) , classroom (number)


Question: what are the last names of the teachers who teach grade 5?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : lastname (text) , classroom (number) , grade (number) | teachers : lastname (text) , classroom (number)


Question: Find the first names of the teachers that teach first grade.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , classroom (number) , grade (number) , lastname (text) | teachers : firstname (text) , classroom (number) , lastname (text)


Question: What are the first names of the teachers who teach grade 1?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , classroom (number) , grade (number) , lastname (text) | teachers : firstname (text) , classroom (number) , lastname (text)


Question: Find the first names of all the teachers that teach in classroom 110.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

teachers : firstname (text) , classroom (number) , lastname (text)


Question: Which teachers teach in classroom 110? Give me their first names.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

teachers : firstname (text) , classroom (number) , lastname (text)


Question: Find the last names of teachers teaching in classroom 109.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

teachers : lastname (text) , classroom (number)


Question: Which teachers teach in classroom 109? Give me their last names.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

teachers : lastname (text) , classroom (number)


Question: Report the first name and last name of all the teachers.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

teachers : firstname (text) , lastname (text)


Question: What are the first name and last name of all the teachers?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

teachers : firstname (text) , lastname (text)


Question: Report the first name and last name of all the students.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text)


Question: Show each student's first name and last name.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text)


Question: Find all students taught by OTHA MOYER. Output the first and last names of the students.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text) , classroom (number) | teachers : firstname (text) , lastname (text) , classroom (number)


Question: Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text) , classroom (number) | teachers : firstname (text) , lastname (text) , classroom (number)


Question: Find all students taught by MARROTTE KIRK. Output first and last names of students.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text) , classroom (number) | teachers : firstname (text) , lastname (text) , classroom (number)


Question: Which are the first and last names of the students taught by MARROTTE KIRK?

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text) , classroom (number) | teachers : firstname (text) , lastname (text) , classroom (number)


Question: Find the first and last name of all the teachers that teach EVELINA BROMLEY.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text) , classroom (number) | teachers : firstname (text) , lastname (text) , classroom (number)


Question: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name  of the teachers.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : firstname (text) , lastname (text) , classroom (number) | teachers : firstname (text) , lastname (text) , classroom (number)


Question: Find the last names of all the teachers that teach GELL TAMI.

list : lastname (text) , firstname (text) , grade (number) , classroom (number) | teachers : lastname (text) , firstname (text) , classroom (number)

list : lastname (text) , classroom (number) , firstname (text) | teachers : lastname (text) , classroom (number) , firstname (text)