aherntech/spider-syn huggingface dataset:
Database: hospital_1
Question: What are names of patients who made an appointment?
Paraphrased question: What are names of patients who made an reservation?
SQL: SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn
Database: hospital_1
Question: List the names of patients who have made appointments.
Paraphrased question: List the names of patients who have made reservation.
SQL: SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn
Database: hospital_1
Question: what are name and phone number of patients who had more than one appointment?
Paraphrased question: what are name and telephone number of patients who had more than one appointment?
SQL: SELECT name ,  phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn GROUP BY T1.patient HAVING count(*)  >  1
Database: hospital_1
Question: Which patients made more than one appointment? Tell me the name and phone number of these patients.
Paraphrased question: Which patients made more than one reservation? Tell me the name and telephone number of these patients.
SQL: SELECT name ,  phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn GROUP BY T1.patient HAVING count(*)  >  1
Database: hospital_1
Question: Find the id of the appointment with the most recent start date?
Paraphrased question: Find the id of the reservation with the most recent start date?
SQL: SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1
Database: hospital_1
Question: What is the id of the appointment that started most recently?
Paraphrased question: What is the id of the reservation that started most recently?
SQL: SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1
Database: hospital_1
Question: List the name of physicians who took some appointment.
Paraphrased question: List the name of doctor who took some reservation.
SQL: SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
Database: hospital_1
Question: What are the names of all the physicians who took appointments.
Paraphrased question: What are the names of all the doctor who took reservation.
SQL: SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
Database: hospital_1
Question: List the name of physicians who never took any appointment.
Paraphrased question: List the name of doctor who never took any reservation.
SQL: SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
Database: hospital_1
Question: Which physicians have never taken any appointment? Find their names.
Paraphrased question: Which doctor have never taken any reservation? Find their names.
SQL: SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID
Database: hospital_1
Question: Find the names of all physicians and their primary affiliated departments' names.
Paraphrased question: Find the names of all doctor and their primary affiliated departments' names.
SQL: SELECT T1.name ,  T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T2.PrimaryAffiliation  =  1
Database: hospital_1
Question: What are the name and primarily affiliated department name of each physician?
Paraphrased question: What are the name and primarily affiliated department name of each doctor?
SQL: SELECT T1.name ,  T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T2.PrimaryAffiliation  =  1
Database: hospital_1
Question: What is the name of the patient who made the most recent appointment?
Paraphrased question: What is the name of the patient who made the most recent reservation?
SQL: SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1
Database: hospital_1
Question: Find the name of the patient who made the appointment with the most recent start date.
Paraphrased question: Find the name of the sick people who made the reservation with the most recent start date.
SQL: SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1
Database: hospital_1
Question: How many patients stay in room 112?
Paraphrased question: How many sick people stay in room 112?
SQL: SELECT count(distinct patient) FROM stay WHERE room  =  112
Database: hospital_1
Question: Count the number of patients who stayed in room 112.
Paraphrased question: Count the number of sick people who stayed in room 112.
SQL: SELECT count(distinct patient) FROM stay WHERE room  =  112
Database: hospital_1
Question: How many patients' prescriptions are made by physician John Dorian?
Paraphrased question: How many patients' prescriptions are made by physician John Dorian?
SQL: SELECT count(distinct T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN  =  T2.patient JOIN physician AS T3 ON T2.physician  =  T3.employeeid WHERE T3.name = "John Dorian"
Database: hospital_1
Question: Find the number of patients' prescriptions physician John Dorian made.
Paraphrased question: Find the number of patients' prescriptions physician John Dorian made.
SQL: SELECT count(distinct T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN  =  T2.patient JOIN physician AS T3 ON T2.physician  =  T3.employeeid WHERE T3.name = "John Dorian"
Database: hospital_1
Question: Find the name of medication used on the patient who stays in room 111?
Paraphrased question: Find the name of medication used on the sick people who stays in room 111?
SQL: SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient  =  T2.SSN JOIN Prescribes AS T3 ON T3.Patient  =  T2.SSN JOIN Medication AS T4 ON T3.Medication  =  T4.Code WHERE room  =  111
Database: hospital_1
Question: What is the name of the medication used for the patient staying in room 111?
Paraphrased question: What is the name of the medication used for the sick people staying in room 111?
SQL: SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient  =  T2.SSN JOIN Prescribes AS T3 ON T3.Patient  =  T2.SSN JOIN Medication AS T4 ON T3.Medication  =  T4.Code WHERE room  =  111
Database: hospital_1
Question: Find the patient who most recently stayed in room 111.
Paraphrased question: Find the sick people who most recently stayed in room 111.
SQL: SELECT patient FROM stay WHERE room  =  111 ORDER BY staystart DESC LIMIT 1
Database: hospital_1
Question: What is the id of the patient who stayed in room 111 most recently?
Paraphrased question: What is the id of the sick people who stayed in room 111 most recently?
SQL: SELECT patient FROM stay WHERE room  =  111 ORDER BY staystart DESC LIMIT 1
Database: hospital_1
Question: What is the name of the nurse has the most appointments?
Paraphrased question: What is the name of the nurse has the most reservation?
SQL: SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid  =  T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1
Database: hospital_1
Question: Find the name of the nurse who has the largest number of appointments.
Paraphrased question: Find the name of the nurse who has the largest number of reservation.
SQL: SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid  =  T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1
Database: hospital_1
Question: How many patients do each physician take care of? List their names and number of patients they take care of.
Paraphrased question: How many sick people do each doctor take care of? List their names and number of sick people they take care of.
SQL: SELECT T1.name ,  count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid
Database: hospital_1
Question: Return the name of each physician and the number of patients he or she treats.
Paraphrased question: Return the name of each doctor and the number of patients he or she treats.
SQL: SELECT T1.name ,  count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid
Database: hospital_1
Question: Find the name of physicians who are in charge of more than one patient.
Paraphrased question: Find the name of doctor who are in charge of more than one patient.
SQL: SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid HAVING count(*)  >  1
Database: hospital_1
Question: Which physicians are in charge of more than one patient? Give me their names.
Paraphrased question: Which doctor are in charge of more than one patient? Give me their names.
SQL: SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid HAVING count(*)  >  1
Database: hospital_1
Question: Find the number of rooms located on each block floor.
Paraphrased question: Find the number of rooms located on each block floor.
SQL: SELECT count(*) ,  T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockfloor
Database: hospital_1
Question: How many rooms does each block floor have?
Paraphrased question: How many rooms does each block floor have?
SQL: SELECT count(*) ,  T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockfloor
Database: hospital_1
Question: Find the number of rooms for different block code?
Paraphrased question: Find the number of rooms for different block code?
SQL: SELECT count(*) ,  T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockcode
Database: hospital_1
Question: How many rooms are located for each block code?
Paraphrased question: How many rooms are located for each block code?
SQL: SELECT count(*) ,  T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockcode
Database: hospital_1
Question: What are the unique block codes that have available rooms?
Paraphrased question: What are the unique block codes that have available rooms?
SQL: SELECT DISTINCT blockcode FROM room WHERE unavailable  =  0
Database: hospital_1
Question: Tell me the distinct block codes where some rooms are available.
Paraphrased question: Tell me the different block codes where some rooms are available.
SQL: SELECT DISTINCT blockcode FROM room WHERE unavailable  =  0
Database: hospital_1
Question: How many different types of rooms are there?
Paraphrased question: How many different categories of rooms are there?
SQL: SELECT count(DISTINCT roomtype) FROM room
Database: hospital_1
Question: Find the number of distinct room types available.
Paraphrased question: Find the number of different room categories available.
SQL: SELECT count(DISTINCT roomtype) FROM room
Database: hospital_1
Question: What is the names of the physicians who prescribe medication Thesisin?
Paraphrased question: What is the names of the doctor who prescribe medication Thesisin?
SQL: SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name  =  "Thesisin"
Database: hospital_1
Question: List the names of all the physicians who prescribe Thesisin as medication.
Paraphrased question: List the names of all the doctor who prescribe Thesisin as medication.
SQL: SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name  =  "Thesisin"
Database: hospital_1
Question: Find the name and position of physicians who prescribe some medication whose brand is X?
Paraphrased question: Find the name and post of doctor who prescribe some medication whose brand is X?
SQL: SELECT DISTINCT T1.name ,  T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand  =  "X"
Database: hospital_1
Question: Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.
Paraphrased question: Which doctor prescribe a medication of brand X? Tell me the name and post of those doctor.
SQL: SELECT DISTINCT T1.name ,  T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand  =  "X"
Database: hospital_1
Question: Find the number of medications prescribed for each brand.
Paraphrased question: Find the number of medications prescribed for each brand.
SQL: SELECT count(*) ,  T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand
Database: hospital_1
Question: How many medications are prescribed for each brand?
Paraphrased question: How many medications are prescribed for each brand?
SQL: SELECT count(*) ,  T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand
Database: hospital_1
Question: Find the name of physicians whose position title contains the word 'senior'.
Paraphrased question: Find the name of doctor whose post title contains the word 'senior'.
SQL: SELECT name FROM physician WHERE POSITION LIKE '%senior%'
Database: hospital_1
Question: What are the names of the physicians who have 'senior' in their titles.
Paraphrased question: What are the names of the doctor who have 'senior' in their titles.
SQL: SELECT name FROM physician WHERE POSITION LIKE '%senior%'
Database: hospital_1
Question: Find the patient who has the most recent undergoing treatment?
Paraphrased question: Find the sick people who has the most recent undergoing treatment?
SQL: SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1
Database: hospital_1
Question: Which patient is undergoing the most recent treatment?
Paraphrased question: Which sick people is undergoing the most recent treatment?
SQL: SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1
Database: hospital_1
Question: Find the names of all patients who have an undergoing treatment and are staying in room 111.
Paraphrased question: Find the names of all sick people who have an undergoing treatment and are staying in room 111.
SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay  =  T3.StayID WHERE T3.room  =  111
Database: hospital_1
Question: What are the names of patients who are staying in room 111 and have an undergoing treatment?
Paraphrased question: What are the names of sick people who are staying in room 111 and have an undergoing treatment?
SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay  =  T3.StayID WHERE T3.room  =  111
Database: hospital_1
Question: List the names of all distinct nurses ordered by alphabetical order?
Paraphrased question: List the names of all different nurses ordered by alphabetical order?
SQL: SELECT DISTINCT name FROM nurse ORDER BY name
Database: hospital_1
Question: What is the alphabetically ordered list of all the distinct names of nurses?
Paraphrased question: What is the alphabetically ordered list of all the different names of nurses?
SQL: SELECT DISTINCT name FROM nurse ORDER BY name
Database: hospital_1
Question: Find the names of nurses who are nursing an undergoing treatment.
Paraphrased question: Find the names of nurses who are nursing an undergoing treatment.
SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse  =  T2.EmployeeID
Database: hospital_1
Question: Which nurses are in charge of patients undergoing treatments?
Paraphrased question: Which nurses are in charge of sick people undergoing treatments?
SQL: SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse  =  T2.EmployeeID
Database: hospital_1
Question: List the names of all distinct medications, ordered in an alphabetical order.
Paraphrased question: List the names of all different medications, ordered in an alphabetical order.
SQL: SELECT DISTINCT name FROM medication ORDER BY name
Database: hospital_1
Question: What is the alphabetically ordered list of all distinct medications?
Paraphrased question: What is the alphabetically ordered list of all different medications?
SQL: SELECT DISTINCT name FROM medication ORDER BY name
Database: hospital_1
Question: What are the names of the physician who prescribed the highest dose?
Paraphrased question: What are the names of the doctor who prescribed the highest dose?
SQL: SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1
Database: hospital_1
Question: Find the physician who prescribed the highest dose. What is his or her name?
Paraphrased question: Find the doctor who prescribed the highest dose. What is his or her name?
SQL: SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1
Database: hospital_1
Question: List the physicians' employee ids together with their primary affiliation departments' ids.
Paraphrased question: List the doctor' employee ids together with their primary affiliation departments' ids.
SQL: SELECT physician ,  department FROM affiliated_with WHERE primaryaffiliation  =  1
Database: hospital_1
Question: What are each physician's employee id and department id primarily affiliated.
Paraphrased question: What are each doctor's employee id and department id primarily affiliated.
SQL: SELECT physician ,  department FROM affiliated_with WHERE primaryaffiliation  =  1
Database: hospital_1
Question: List the names of departments where some physicians are primarily affiliated with.
Paraphrased question: List the names of divisions where some doctor are primarily affiliated with.
SQL: SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation  =  1
Database: hospital_1
Question: What are the names of departments that have primarily affiliated physicians.
Paraphrased question: What are the names of divisions that have primarily affiliated doctor.
SQL: SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation  =  1
Database: hospital_1
Question: What nurses are on call with block floor 1 and block code 1? Tell me their names.
Paraphrased question: What nurses are on call with block floor 1 and block code 1? Tell me their names.
SQL: SELECT nurse FROM on_call WHERE blockfloor  =  1 AND blockcode  =  1
Database: hospital_1
Question: Find the ids of the nurses who are on call in block floor 1 and block code 1.
Paraphrased question: Find the ids of the nurses who are on call in block floor 1 and block code 1.
SQL: SELECT nurse FROM on_call WHERE blockfloor  =  1 AND blockcode  =  1
Database: hospital_1
Question: What are the highest cost, lowest cost and average cost of procedures?
Paraphrased question: What are the highest price, lowest price and average price of procedures?
SQL: SELECT MAX(cost) ,  MIN(cost) ,  AVG(cost) FROM procedures
Database: hospital_1
Question: Tell me the highest, lowest, and average cost of procedures.
Paraphrased question: Tell me the highest, lowest, and average price of procedures.
SQL: SELECT MAX(cost) ,  MIN(cost) ,  AVG(cost) FROM procedures
Database: hospital_1
Question: List the name and cost of all procedures sorted by the cost from the highest to the lowest.
Paraphrased question: List the name and price of all procedures sorted by the price from the highest to the lowest.
SQL: SELECT name ,  cost FROM procedures ORDER BY cost DESC
Database: hospital_1
Question: Sort the list of names and costs of all procedures in the descending order of cost.
Paraphrased question: Sort the list of names and price of all procedures in the descending order of price.
SQL: SELECT name ,  cost FROM procedures ORDER BY cost DESC
Database: hospital_1
Question: Find the three most expensive procedures.
Paraphrased question: Find the three most expensive procedures.
SQL: SELECT name FROM procedures ORDER BY cost LIMIT 3
Database: hospital_1
Question: What are the three most costly procedures?
Paraphrased question: What are the three most costly procedures?
SQL: SELECT name FROM procedures ORDER BY cost LIMIT 3
Database: hospital_1
Question: Find the physicians who are trained in a procedure that costs more than 5000.
Paraphrased question: Find the doctor who are trained in a procedure that costs more than 5000.
SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T3.cost  >  5000
Database: hospital_1
Question: Which physicians are trained in procedures that are more expensive than 5000?
Paraphrased question: Which doctor are trained in procedures that are more expensive than 5000?
SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T3.cost  >  5000
Database: hospital_1
Question: Find the physician who was trained in the most expensive procedure?
Paraphrased question: Find the doctor who was trained in the most expensive procedure?
SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment ORDER BY T3.cost DESC LIMIT 1
Database: hospital_1
Question: Which physician was trained in the procedure that costs the most.
Paraphrased question: Which doctor was trained in the procedure that costs the most.
SQL: SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment ORDER BY T3.cost DESC LIMIT 1
Database: hospital_1
Question: What is the average cost of procedures that physician John Wen was trained in?
Paraphrased question: What is the average price of procedures that doctor John Wen was trained in?
SQL: SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: Compute the mean price of procedures physician John Wen was trained in.
Paraphrased question: Compute the mean price of procedures doctor John Wen was trained in.
SQL: SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: Find the names of procedures which physician John Wen was trained in.
Paraphrased question: Find the names of procedures which doctor John Wen was trained in.
SQL: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: What are the names of procedures physician John Wen was trained in?
Paraphrased question: What are the names of procedures doctor John Wen was trained in?
SQL: SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: Find all procedures which cost more than 1000 or which physician John Wen was trained in.
Paraphrased question: Find all procedures which cost more than 1000 or which physician John Wen was trained in.
SQL: SELECT name FROM procedures WHERE cost  >  1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: What are the procedures that cost more than 1000 or are specialized in by physician John Wen?
Paraphrased question: What are the procedures that price more than 1000 or are specialized in by physician John Wen?
SQL: SELECT name FROM procedures WHERE cost  >  1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?
Paraphrased question: Find the names of all procedures which price more than 1000 but which physician John Wen was not trained in?
SQL: SELECT name FROM procedures WHERE cost  >  1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?
Paraphrased question: Among the procedures that price more than 1000, which were not specialized in by physician John Wen?
SQL: SELECT name FROM procedures WHERE cost  >  1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.
Paraphrased question: Find the names of all procedures such that the price is less than 5000 and physician John Wen was trained in.
SQL: SELECT name FROM procedures WHERE cost  <  5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: What procedures cost less than 5000 and have John Wen as a trained physician?
Paraphrased question: What procedures price less than 5000 and have John Wen as a trained physician?
SQL: SELECT name FROM procedures WHERE cost  <  5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"
Database: hospital_1
Question: Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.
Paraphrased question: Find the name of doctor who are affiliated with both Surgery and Psychiatry divisions.
SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Psychiatry'
Database: hospital_1
Question: Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.
Paraphrased question: Which doctor are affiliated with both Surgery and Psychiatry divisions? Tell me their names.
SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Psychiatry'
Database: hospital_1
Question: Find the name of physicians who are affiliated with Surgery or Psychiatry department.
Paraphrased question: Find the name of doctor who are affiliated with Surgery or Psychiatry division.
SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Surgery' OR T3.name  =  'Psychiatry'
Database: hospital_1
Question: Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.
Paraphrased question: Which doctor are affiliated with either Surgery or Psychiatry department? Give me their names.
SQL: SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Surgery' OR T3.name  =  'Psychiatry'
Database: hospital_1
Question: Find the names of patients who are not using the medication of Procrastin-X.
Paraphrased question: Find the names of sick people who are not using the medication of Procrastin-X.
SQL: SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient  =  T1.SSN JOIN Medication AS T3 ON T2.Medication  =  T3.Code WHERE T3.name  =  'Procrastin-X'
Database: hospital_1
Question: What are the names of patients who are not taking the medication of Procrastin-X.
Paraphrased question: What are the names of sick people who are not taking the medication of Procrastin-X.
SQL: SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient  =  T1.SSN JOIN Medication AS T3 ON T2.Medication  =  T3.Code WHERE T3.name  =  'Procrastin-X'
Database: hospital_1
Question: Find the number of patients who are not using the medication of Procrastin-X.
Paraphrased question: Find the number of sick people who are not using the medication of Procrastin-X.
SQL: SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication  =  T2.Code WHERE T2.name  =  'Procrastin-X' )
Database: hospital_1
Question: How many patients are not using Procrastin-X as medication?
Paraphrased question: How many sick people are not using Procrastin-X as medication?
SQL: SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication  =  T2.Code WHERE T2.name  =  'Procrastin-X' )
Database: hospital_1
Question: How many appointments are there?
Paraphrased question: How many reservation are there?
SQL: SELECT count(*) FROM appointment
Database: hospital_1
Question: Count how many appointments have been made in total.
Paraphrased question: Count how many reservation have been made in total.
SQL: SELECT count(*) FROM appointment
Database: hospital_1
Question: Find the names of nurses who are on call.
Paraphrased question: Find the names of nurses who are on call.
SQL: SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID  =  T2.nurse
Database: hospital_1
Question: What are the distinct names of nurses on call?
Paraphrased question: What are the different names of nurses on call?
SQL: SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID  =  T2.nurse
Database: ship_mission
Question: How many ships are there?
Paraphrased question: How many vessels are there?
SQL: SELECT count(*) FROM ship
Database: ship_mission
Question: What is the number of ships?
Paraphrased question: What is the number of vessels?
SQL: SELECT count(*) FROM ship
Database: ship_mission
Question: List the name of ships in ascending order of tonnage.
Paraphrased question: List the name of vessels in ascending order of tonnage.
SQL: SELECT Name FROM ship ORDER BY Tonnage ASC
Database: ship_mission
Question: what are the names of the ships ordered by ascending tonnage?
Paraphrased question: what are the names of the vessels ordered by ascending tonnage?
SQL: SELECT Name FROM ship ORDER BY Tonnage ASC
Database: ship_mission
Question: What are the type and nationality of ships?
Paraphrased question: What are the category and nation of vessels?
SQL: SELECT TYPE ,  Nationality FROM ship
Database: ship_mission
Question: What are the types and nationalities of every ship?
Paraphrased question: What are the categories and nation of every vessel?
SQL: SELECT TYPE ,  Nationality FROM ship
Database: ship_mission
Question: List the name of ships whose nationality is not "United States".
Paraphrased question: List the name of vessels whose nation is not "United States".
SQL: SELECT Name FROM ship WHERE Nationality != "United States"
Database: ship_mission
Question: What are the names of the ships that are not from the United States?
Paraphrased question: What are the names of the vessels that are not from the United States?
SQL: SELECT Name FROM ship WHERE Nationality != "United States"
Database: ship_mission
Question: Show the name of ships whose nationality is either United States or United Kingdom.
Paraphrased question: Show the name of vessels whose nation is either United States or United Kingdom.
SQL: SELECT Name FROM ship WHERE Nationality  =  "United States" OR Nationality  =  "United Kingdom"
Database: ship_mission
Question: What are the names of the ships that are from either the US or the UK?
Paraphrased question: What are the names of the vessels that are from either the US or the UK?
SQL: SELECT Name FROM ship WHERE Nationality  =  "United States" OR Nationality  =  "United Kingdom"
Database: ship_mission
Question: What is the name of the ship with the largest tonnage?
Paraphrased question: What is the name of the vessel with the largest tonnage?
SQL: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1
Database: ship_mission
Question: What is the ship with the largest amount of tonnage called?
Paraphrased question: What is the vessel with the largest amount of tonnage called?
SQL: SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1
Database: ship_mission
Question: Show different types of ships and the number of ships of each type.
Paraphrased question: Show different categories of vessels and the number of vessels of each category.
SQL: SELECT TYPE ,  COUNT(*) FROM ship GROUP BY TYPE
Database: ship_mission
Question: For each type, how many ships are there?
Paraphrased question: For each category, how many vessels are there?
SQL: SELECT TYPE ,  COUNT(*) FROM ship GROUP BY TYPE
Database: ship_mission
Question: Please show the most common type of ships.
Paraphrased question: Please show the most common category of vessels.
SQL: SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
Database: ship_mission
Question: What is the most common type of ships?
Paraphrased question: What is the most common category of vessels?
SQL: SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
Database: ship_mission
Question: List the nations that have more than two ships.
Paraphrased question: List the nations that have more than two vessels.
SQL: SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*)  >  2
Database: ship_mission
Question: What are the nations that have more than two ships?
Paraphrased question: What are the nations that have more than two vessels?
SQL: SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*)  >  2
Database: ship_mission
Question: Show different types of ships and the average tonnage of ships of each type.
Paraphrased question: Show different categories of vessels and the average tonnage of vessels of each category.
SQL: SELECT TYPE ,  avg(Tonnage) FROM ship GROUP BY TYPE
Database: ship_mission
Question: For each type, what is the average tonnage?
Paraphrased question: For each category, what is the average tonnage?
SQL: SELECT TYPE ,  avg(Tonnage) FROM ship GROUP BY TYPE
Database: ship_mission
Question: Show codes and fates of missions, and names of ships involved.
Paraphrased question: Show codes and destiny of missions, and names of ships involved.
SQL: SELECT T1.Code ,  T1.Fate ,  T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID
Database: ship_mission
Question: What are the mission codes, fates, and names of the ships involved?
Paraphrased question: What are the mission codes, destiny, and names of the ships involved?
SQL: SELECT T1.Code ,  T1.Fate ,  T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID
Database: ship_mission
Question: Show names of ships involved in a mission launched after 1928.
Paraphrased question: Show names of vessels involved in a mission launched after 1928.
SQL: SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T1.Launched_Year  >  1928
Database: ship_mission
Question: What are the names of ships that were involved in a mission launched after 1928?
Paraphrased question: What are the names of vessels that were involved in a mission launched after 1928?
SQL: SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T1.Launched_Year  >  1928
Database: ship_mission
Question: Show the distinct fate of missions that involve ships with nationality "United States"
Paraphrased question: Show the different destiny of missions that involve ships with nationality "United States"
SQL: SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T2.Nationality  =  "United States"
Database: ship_mission
Question: What are the different fates of the mission that involved ships from the United States?
Paraphrased question: What are the different destiny of the mission that involved ships from the United States?
SQL: SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T2.Nationality  =  "United States"
Database: ship_mission
Question: List the name of ships that are not involved in any mission
Paraphrased question: List the name of vessel that are not involved in any mission
SQL: SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)
Database: ship_mission
Question: What are the names of the ships that are not involved in any missions?
Paraphrased question: What are the names of the vessel that are not involved in any missions?
SQL: SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)
Database: ship_mission
Question: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.
Paraphrased question: Show the categories of vessel that have both vessel with tonnage larger than 6000 and vessel with tonnage smaller than 4000.
SQL: SELECT TYPE FROM ship WHERE Tonnage  >  6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage  <  4000
Database: ship_mission
Question: What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?
Paraphrased question: What are the categories of the vessel that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?
SQL: SELECT TYPE FROM ship WHERE Tonnage  >  6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage  <  4000
Database: student_1
Question: Find the number of students in total.
Paraphrased question: Find the number of students in total.
SQL: SELECT count(*) FROM list
Database: student_1
Question: How many students are there?
Paraphrased question: How many students are there?
SQL: SELECT count(*) FROM list
Database: student_1
Question: Find the last names of students studying in room 111.
Paraphrased question: Find the family names of students studying in room 111.
SQL: SELECT lastname FROM list WHERE classroom  =  111
Database: student_1
Question: What are the last names of students in room 111?
Paraphrased question: What are the family names of students in room 111?
SQL: SELECT lastname FROM list WHERE classroom  =  111
Database: student_1
Question: Find the first names of students studying in room 108.
Paraphrased question: Find the forenames of students studying in room 108.
SQL: SELECT firstname FROM list WHERE classroom  =  108
Database: student_1
Question: What are the first names of students in room 108?
Paraphrased question: What are the forenames of students in room 108?
SQL: SELECT firstname FROM list WHERE classroom  =  108
Database: student_1
Question: What are the first names of students studying in room 107?
Paraphrased question: What are the forenames of students studying in room 107?
SQL: SELECT DISTINCT firstname FROM list WHERE classroom  =  107
Database: student_1
Question: List the first names of all the students in room 107.
Paraphrased question: List the forenames of all the students in room 107.
SQL: SELECT DISTINCT firstname FROM list WHERE classroom  =  107
Database: student_1
Question: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.
Paraphrased question: For each class room report the grade that is taught in it. Report just the class room number and the grade number.
SQL: SELECT DISTINCT classroom ,  grade FROM list
Database: student_1
Question: What are the grade number and classroom number of each class in the list?
Paraphrased question: What are the grade number and class room number of each class in the list?
SQL: SELECT DISTINCT classroom ,  grade FROM list
Database: student_1
Question: Which grade is studying in classroom 103?
Paraphrased question: Which grade is studying in class room 103?
SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  103
Database: student_1
Question: Find the grade taught in classroom 103.
Paraphrased question: Find the grade taught in class room 103.
SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  103
Database: student_1
Question: Find the grade studying in room 105.
Paraphrased question: Find the grade studying in room 105.
SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  105
Database: student_1
Question: Which grade is studying in room 105?
Paraphrased question: Which grade is studying in room 105?
SQL: SELECT DISTINCT grade FROM list WHERE classroom  =  105
Database: student_1
Question: Which classrooms are used by grade 4?
Paraphrased question: Which schoolrooms are used by grade 4?
SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  4
Database: student_1
Question: Find the classrooms in which grade 4 is studying.
Paraphrased question: Find the schoolrooms in which grade 4 is studying.
SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  4
Database: student_1
Question: Which classrooms are used by grade 5?
Paraphrased question: Which schoolrooms are used by grade 5?
SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  5
Database: student_1
Question: Show me the classrooms grade 5 is using.
Paraphrased question: Show me the schoolrooms grade 5 is using.
SQL: SELECT DISTINCT classroom FROM list WHERE grade  =  5
Database: student_1
Question: Find the last names of the teachers that teach fifth grade.
Paraphrased question: Find the family names of the teachers that teach fifth grade.
SQL: SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  5
Database: student_1
Question: what are the last names of the teachers who teach grade 5?
Paraphrased question: what are the family names of the teachers who teach grade 5?
SQL: SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  5
Database: student_1
Question: Find the first names of the teachers that teach first grade.
Paraphrased question: Find the forenames of the teachers that teach first grade.
SQL: SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  1
Database: student_1
Question: What are the first names of the teachers who teach grade 1?
Paraphrased question: What are the forenames of the teachers who teach grade 1?
SQL: SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  1
Database: student_1
Question: Find the first names of all the teachers that teach in classroom 110.
Paraphrased question: Find the forenames of all the teachers that teach in classroom 110.
SQL: SELECT firstname FROM teachers WHERE classroom  =  110
Database: student_1
Question: Which teachers teach in classroom 110? Give me their first names.
Paraphrased question: Which teachers teach in classroom 110? Give me their forenames.
SQL: SELECT firstname FROM teachers WHERE classroom  =  110
Database: student_1
Question: Find the last names of teachers teaching in classroom 109.
Paraphrased question: Find the family names of teachers teaching in classroom 109.
SQL: SELECT lastname FROM teachers WHERE classroom  =  109
Database: student_1
Question: Which teachers teach in classroom 109? Give me their last names.
Paraphrased question: Which teachers teach in classroom 109? Give me their family names.
SQL: SELECT lastname FROM teachers WHERE classroom  =  109
Database: student_1
Question: Report the first name and last name of all the teachers.
Paraphrased question: Report the forename and surname of all the teachers.
SQL: SELECT DISTINCT firstname ,  lastname FROM teachers
Database: student_1
Question: What are the first name and last name of all the teachers?
Paraphrased question: What are the forename and surname of all the teachers?
SQL: SELECT DISTINCT firstname ,  lastname FROM teachers
Database: student_1
Question: Report the first name and last name of all the students.
Paraphrased question: Report the forename and family name of all the students.
SQL: SELECT DISTINCT firstname ,  lastname FROM list
Database: student_1
Question: Show each student's first name and last name.
Paraphrased question: Show each student's forename and family name.
SQL: SELECT DISTINCT firstname ,  lastname FROM list
Database: student_1
Question: Find all students taught by OTHA MOYER. Output the first and last names of the students.
Paraphrased question: Find all students taught by OTHA MOYER. Output the full names of the students.
SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"
Database: student_1
Question: Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.
Paraphrased question: Which students study under the teacher named OTHA MOYER? Give me the full names of the students.
SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"
Database: student_1
Question: Find all students taught by MARROTTE KIRK. Output first and last names of students.
Paraphrased question: Find all students taught by MARROTTE KIRK. Output forename and surname of students.
SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "MARROTTE" AND T2.lastname  =  "KIRK"
Database: student_1
Question: Which are the first and last names of the students taught by MARROTTE KIRK?
Paraphrased question: Which are the forename and surname of the students taught by MARROTTE KIRK?
SQL: SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "MARROTTE" AND T2.lastname  =  "KIRK"
Database: student_1
Question: Find the first and last name of all the teachers that teach EVELINA BROMLEY.
Paraphrased question: Find the forename and surname of all the teachers that teach EVELINA BROMLEY.
SQL: SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "EVELINA" AND T1.lastname  =  "BROMLEY"
Database: student_1
Question: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.
Paraphrased question: Which teachers teach the student named EVELINA BROMLEY? Give me the forename and surname of the teachers.
SQL: SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "EVELINA" AND T1.lastname  =  "BROMLEY"
Database: student_1
Question: Find the last names of all the teachers that teach GELL TAMI.
Paraphrased question: Find the surnames of all the teachers that teach GELL TAMI.
SQL: SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "GELL" AND T1.lastname  =  "TAMI"
Database: student_1
Question: What are the last names of the teachers who teach the student called GELL TAMI?
Paraphrased question: What are the surnames of the teachers who teach the student called GELL TAMI?
SQL: SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "GELL" AND T1.lastname  =  "TAMI"
Database: student_1
Question: How many students does LORIA ONDERSMA teaches?
Paraphrased question: How many students does LORIA ONDERSMA teaches?
SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "LORIA" AND T2.lastname  =  "ONDERSMA"