richardr1126/spider-skeleton-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: What are the distinct names of nurses on call? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | 

### Response:

select distinct _ from _ | select distinct nurse.name from nurse join on_call on nurse.employeeid = on_call.nurse
### Instruction:

Convert text to sql: How many ships are there? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from ship
### Instruction:

Convert text to sql: What is the number of ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select count ( _ ) from _ | select count ( * ) from ship
### Instruction:

Convert text to sql: List the name of ships in ascending order of tonnage. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ asc | select name from ship order by tonnage asc
### Instruction:

Convert text to sql: what are the names of the ships ordered by ascending tonnage? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ asc | select name from ship order by tonnage asc
### Instruction:

Convert text to sql: What are the type and nationality of ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ | select type , nationality from ship
### Instruction:

Convert text to sql: What are the types and nationalities of every ship? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ | select type , nationality from ship
### Instruction:

Convert text to sql: List the name of ships whose nationality is not "United States". | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select name from ship where nationality != 'United States'
### Instruction:

Convert text to sql: What are the names of the ships that are not from the United States? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select name from ship where nationality != 'United States'
### Instruction:

Convert text to sql: Show the name of ships whose nationality is either United States or United Kingdom. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select name from ship where nationality = 'United States' or nationality = 'United Kingdom'
### Instruction:

Convert text to sql: What are the names of the ships  that are from either the US or the UK? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select name from ship where nationality = 'United States' or nationality = 'United Kingdom'
### Instruction:

Convert text to sql: What is the name of the ship with the largest tonnage? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from ship order by tonnage desc limit 1
### Instruction:

Convert text to sql: What is the ship with the largest amount of tonnage called? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ order by _ desc limit _ | select name from ship order by tonnage desc limit 1
### Instruction:

Convert text to sql: Show different types of ships and the number of ships of each type. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select type , count ( * ) from ship group by type
### Instruction:

Convert text to sql: For each type, how many ships are there? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select type , count ( * ) from ship group by type
### Instruction:

Convert text to sql: Please show the most common type of ships. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select type from ship group by type order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: What is the most common type of ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select type from ship group by type order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: List the nations that have more than two ships. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select nationality from ship group by nationality having count ( * ) > 2
### Instruction:

Convert text to sql: What are the nations that have more than two ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ group by _ having count ( _ ) > _ | select nationality from ship group by nationality having count ( * ) > 2
### Instruction:

Convert text to sql: Show different types of ships and the average tonnage of ships of each type. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ , avg ( _ ) from _ group by _ | select type , avg ( tonnage ) from ship group by type
### Instruction:

Convert text to sql: For each type, what is the average tonnage? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ , avg ( _ ) from _ group by _ | select type , avg ( tonnage ) from ship group by type
### Instruction:

Convert text to sql: Show codes and fates of missions, and names of ships involved. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ | select mission.code , mission.fate , ship.name from mission join ship on mission.ship_id = ship.ship_id
### Instruction:

Convert text to sql: What are the mission codes, fates, and names of the ships involved? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ | select mission.code , mission.fate , ship.name from mission join ship on mission.ship_id = ship.ship_id
### Instruction:

Convert text to sql: Show names of ships involved in a mission launched after 1928. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select ship.name from mission join ship on mission.ship_id = ship.ship_id where mission.launched_year > 1928
### Instruction:

Convert text to sql: What are the names of ships that were involved in a mission launched after 1928? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ | select ship.name from mission join ship on mission.ship_id = ship.ship_id where mission.launched_year > 1928
### Instruction:

Convert text to sql: Show the distinct fate of missions that involve ships with nationality "United States" | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select distinct _ from _ where _ | select distinct mission.fate from mission join ship on mission.ship_id = ship.ship_id where ship.nationality = 'United States'
### Instruction:

Convert text to sql: What are the different fates of the mission that involved ships from the United States? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select distinct _ from _ where _ | select distinct mission.fate from mission join ship on mission.ship_id = ship.ship_id where ship.nationality = 'United States'
### Instruction:

Convert text to sql: List the name of ships that are not involved in any mission | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from ship where ship_id not in ( select ship_id from mission )
### Instruction:

Convert text to sql: What are the names of the ships that are not involved in any missions? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from ship where ship_id not in ( select ship_id from mission )
### Instruction:

Convert text to sql: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000
### Instruction:

Convert text to sql: 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 , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000
### Instruction:

Convert text to sql: Find the number of students in total. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ | select count ( * ) from list
### Instruction:

Convert text to sql: How many students are there? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ | select count ( * ) from list
### Instruction:

Convert text to sql: Find the last names of students studying in room 111. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select lastname from list where classroom = 111
### Instruction:

Convert text to sql: What are the last names of students in room 111? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select lastname from list where classroom = 111
### Instruction:

Convert text to sql: Find the first names of students studying in room 108. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select firstname from list where classroom = 108
### Instruction:

Convert text to sql: What are the first names of students in room 108? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select firstname from list where classroom = 108
### Instruction:

Convert text to sql: What are the first names of students studying in room 107? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct firstname from list where classroom = 107
### Instruction:

Convert text to sql: List the first names of all the students in room 107. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct firstname from list where classroom = 107
### Instruction:

Convert text to sql: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ | select distinct classroom , grade from list
### Instruction:

Convert text to sql: What are the grade number and classroom number of each class in the list? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ | select distinct classroom , grade from list
### Instruction:

Convert text to sql: Which grade is studying in classroom 103? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct grade from list where classroom = 103
### Instruction:

Convert text to sql: Find the grade taught in classroom 103. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct grade from list where classroom = 103
### Instruction:

Convert text to sql: Find the grade studying in room 105. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct grade from list where classroom = 105
### Instruction:

Convert text to sql: Which grade is studying in room 105? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct grade from list where classroom = 105
### Instruction:

Convert text to sql: Which classrooms are used by grade 4? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct classroom from list where grade = 4
### Instruction:

Convert text to sql: Find the classrooms in which grade 4 is studying. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct classroom from list where grade = 4
### Instruction:

Convert text to sql: Which classrooms are used by grade 5? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct classroom from list where grade = 5
### Instruction:

Convert text to sql: Show me the classrooms grade 5 is using. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct classroom from list where grade = 5
### Instruction:

Convert text to sql: Find the last names of the teachers that teach fifth grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct teachers.lastname from list join teachers on list.classroom = teachers.classroom where grade = 5
### Instruction:

Convert text to sql: what are the last names of the teachers who teach grade 5? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct teachers.lastname from list join teachers on list.classroom = teachers.classroom where grade = 5
### Instruction:

Convert text to sql: Find the first names of the teachers that teach first grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct teachers.firstname from list join teachers on list.classroom = teachers.classroom where grade = 1
### Instruction:

Convert text to sql: What are the first names of the teachers who teach grade 1? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct teachers.firstname from list join teachers on list.classroom = teachers.classroom where grade = 1
### Instruction:

Convert text to sql: Find the first names of all the teachers that teach in classroom 110. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select firstname from teachers where classroom = 110
### Instruction:

Convert text to sql: Which teachers teach in classroom 110? Give me their first names. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select firstname from teachers where classroom = 110
### Instruction:

Convert text to sql: Find the last names of teachers teaching in classroom 109. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select lastname from teachers where classroom = 109
### Instruction:

Convert text to sql: Which teachers teach in classroom 109? Give me their last names. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select lastname from teachers where classroom = 109
### Instruction:

Convert text to sql: Report the first name and last name of all the teachers. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ | select distinct firstname , lastname from teachers
### Instruction:

Convert text to sql: What are the first name and last name of all the teachers? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ | select distinct firstname , lastname from teachers
### Instruction:

Convert text to sql: Report the first name and last name of all the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ | select distinct firstname , lastname from list
### Instruction:

Convert text to sql: Show each student's first name and last name. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ | select distinct firstname , lastname from list
### Instruction:

Convert text to sql: Find all students taught by OTHA MOYER. Output the first and last names of the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'OTHA' and teachers.lastname = 'MOYER'
### Instruction:

Convert text to sql: Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ where _ | select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'OTHA' and teachers.lastname = 'MOYER'