richardr1126/spider-context-instruct huggingface dataset:
### 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 list

### Instruction:

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

### Response:

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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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: Find all students taught by MARROTTE KIRK. Output first and last names of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'MARROTTE' and teachers.lastname = 'KIRK'
### Instruction:

Convert text to sql: Which are the first and last names of the students taught by MARROTTE KIRK? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'MARROTTE' and teachers.lastname = 'KIRK'

### Instruction:

Convert text to sql: Find the first and last name of all the teachers that teach EVELINA BROMLEY. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'EVELINA' and list.lastname = 'BROMLEY'

### Instruction:

Convert text to sql: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name  of the teachers. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'EVELINA' and list.lastname = 'BROMLEY'

### Instruction:

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

### Response:

select teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'GELL' and list.lastname = 'TAMI'

### Instruction:

Convert text to sql: What are the last names of the teachers who teach the student called GELL TAMI? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'GELL' and list.lastname = 'TAMI'

### Instruction:

Convert text to sql: How many students does LORIA ONDERSMA teaches? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'LORIA' and teachers.lastname = 'ONDERSMA'

### Instruction:

Convert text to sql: Count the number of students the teacher LORIA ONDERSMA teaches. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'LORIA' and teachers.lastname = 'ONDERSMA'

### Instruction:

Convert text to sql: How many students does KAWA GORDON teaches? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'KAWA' and teachers.lastname = 'GORDON'