richardr1126/spider-skeleton-context-instruct huggingface dataset:
### 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 _ from _ where _ | 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 _ from _ where _ | 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 _ from _ where _ | 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 _ from _ where _ | 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 _ from _ where _ | 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 _ from _ where _ | 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 _ where _ | 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 _ where _ | 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 _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'KAWA' and teachers.lastname = 'GORDON'
### Instruction:

Convert text to sql: Find the number of students taught by the teacher KAWA GORDON. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

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

Convert text to sql: Find the number of students taught by TARRING LEIA. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'TARRING' and teachers.lastname = 'LEIA'
### Instruction:

Convert text to sql: How many students are taught by teacher TARRING LEIA? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'TARRING' and teachers.lastname = 'LEIA'
### Instruction:

Convert text to sql: How many teachers does the student named CHRISSY NABOZNY have? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'CHRISSY' and list.lastname = 'NABOZNY'
### Instruction:

Convert text to sql: Find the number of teachers who teach the student called CHRISSY NABOZNY. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'CHRISSY' and list.lastname = 'NABOZNY'
### Instruction:

Convert text to sql: How many teachers does the student named MADLOCK RAY have? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'MADLOCK' and list.lastname = 'RAY'
### Instruction:

Convert text to sql: Find the number of teachers who teach the student called MADLOCK RAY. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'MADLOCK' and list.lastname = 'RAY'
### Instruction:

Convert text to sql: Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ except select _ from _ where _ | select distinct list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 1 except 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: What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ except select _ from _ where _ | select distinct list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 1 except 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 the last names of the students in third grade that are not taught by COVIN JEROME. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 3 and teachers.firstname != 'COVIN' and teachers.lastname != 'JEROME'
### Instruction:

Convert text to sql: Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select distinct _ from _ where _ | select distinct list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 3 and teachers.firstname != 'COVIN' and teachers.lastname != 'JEROME'
### Instruction:

Convert text to sql: For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( distinct _ ) , count ( _ ) from _ group by _ | select grade , count ( distinct classroom ) , count ( * ) from list group by grade
### Instruction:

Convert text to sql: For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( distinct _ ) , count ( _ ) from _ group by _ | select grade , count ( distinct classroom ) , count ( * ) from list group by grade
### Instruction:

Convert text to sql: For each classroom, report the classroom number and the number of grades using it. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( distinct _ ) from _ group by _ | select classroom , count ( distinct grade ) from list group by classroom
### Instruction:

Convert text to sql: For each classroom, show the classroom number and count the number of distinct grades that use the room. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( distinct _ ) from _ group by _ | select classroom , count ( distinct grade ) from list group by classroom
### Instruction:

Convert text to sql: Which classroom has the most students? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

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

Convert text to sql: Find the classroom that the most students use. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

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

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

### Response:

select _ , count ( _ ) from _ group by _ | select classroom , count ( * ) from list group by classroom
### Instruction:

Convert text to sql: For each classroom, show the classroom number and find how many students are using it. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( _ ) from _ group by _ | select classroom , count ( * ) from list group by classroom
### Instruction:

Convert text to sql: For each grade 0 classroom, report the total number of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '0' group by classroom
### Instruction:

Convert text to sql: For each grade 0 classroom, return the classroom number and the count of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '0' group by classroom
### Instruction:

Convert text to sql: Report the total number of students for each fourth-grade classroom. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '4' group by classroom
### Instruction:

Convert text to sql: For each fourth-grade classroom, show the classroom number and the total number of students using it. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '4' group by classroom
### Instruction:

Convert text to sql: Find the name of the teacher who teaches the largest number of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom group by teachers.firstname , teachers.lastname order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: Which teacher teaches the most students? Give me the first name and last name of the teacher. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select _ from _ group by _ order by count ( _ ) desc limit _ | select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom group by teachers.firstname , teachers.lastname order by count ( * ) desc limit 1
### Instruction:

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

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , classroom from list group by classroom
### Instruction:

Convert text to sql: How many students does one classroom have? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , classroom from list group by classroom
### Instruction:

Convert text to sql: How many companies are headquartered in the US? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select count ( _ ) from _ where _ | select count ( * ) from company where headquarters = 'USA'
### Instruction:

Convert text to sql: List the names of companies by ascending number of sales. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ order by _ asc | select name from company order by sales_in_billion asc
### Instruction:

Convert text to sql: What are the headquarters and industries of all companies? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ | select headquarters , industry from company
### Instruction:

Convert text to sql: Show the names of companies in the banking or retailing industry? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ where _ | select name from company where industry = 'Banking' or industry = 'Retailing'
### Instruction:

Convert text to sql: What is the maximum and minimum market value of companies? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select max ( _ ) , min ( _ ) from _ | select max ( market_value_in_billion ) , min ( market_value_in_billion ) from company
### Instruction:

Convert text to sql: What is the headquarter of the company with the largest sales? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ order by _ desc limit _ | select headquarters from company order by sales_in_billion desc limit 1
### Instruction:

Convert text to sql: Show the different headquarters and number of companies at each headquarter. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select headquarters , count ( * ) from company group by headquarters
### Instruction:

Convert text to sql: Show the most common headquarter for companies. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

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

Convert text to sql: Show the headquarters that have at least two companies. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ group by _ having count ( _ ) >= _ | select headquarters from company group by headquarters having count ( * ) >= 2
### Instruction:

Convert text to sql: Show the headquarters that have both companies in banking industry and companies in oil and gas industry. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select headquarters from company where industry = 'Banking' intersect select headquarters from company where industry = 'Oil and gas'
### Instruction:

Convert text to sql: Show the names of companies and of employees. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ | select company.name , people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id
### Instruction:

Convert text to sql: Show names of companies and that of employees in descending order of number of years working for that employee. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ order by _ asc | select company.name , people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id order by employment.year_working asc
### Instruction:

Convert text to sql: Show the names of employees that work for companies with sales bigger than 200. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ where _ | select people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id where company.sales_in_billion > 200
### Instruction:

Convert text to sql: Show the names of companies and the number of employees they have | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ , count ( _ ) from _ group by _ | select company.name , count ( * ) from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id group by company.name
### Instruction:

Convert text to sql: List the names of people that are not employed by any company | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select people_id from employment )