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

Convert text to sql: Show the names of all the donors except those whose donation amount less than 9. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select donator_name from endowment except select donator_name from endowment where amount < 9

### Instruction:

Convert text to sql: List the amount and donor name for the largest amount of donation. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select amount , donator_name from endowment order by amount desc limit 1

### Instruction:

Convert text to sql: How many budgets are above 3000 in year 2001 or before? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select count ( * ) from budget where budgeted > 3000 and year <= 2001

### Instruction:

Convert text to sql: Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000 | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select count ( * ) from budget where budgeted > 3000 and year <= 2001

### Instruction:

Convert text to sql: Show each school name, its budgeted amount, and invested amount in year 2002 or after. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select school.school_name , budget.budgeted , budget.invested from budget join school on budget.school_id = school.school_id where budget.year >= 2002
### Instruction:

Convert text to sql: Show all donor names. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select distinct donator_name from endowment

### Instruction:

Convert text to sql: How many budget record has a budget amount smaller than the invested amount? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select count ( * ) from budget where budgeted < invested

### Instruction:

Convert text to sql: What is the total budget amount for school "Glenn" in all years? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select sum ( budget.budgeted ) from budget join school on budget.school_id = school.school_id where school.school_name = 'Glenn'

### Instruction:

Convert text to sql: Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select school.school_name from budget join school on budget.school_id = school.school_id join endowment on school.school_id = endowment.school_id group by school.school_name having sum ( budget.budgeted ) > 100 or sum ( endowment.amount ) > 10
### Instruction:

Convert text to sql: Find the names of schools that have more than one donator with donation amount above 8.5. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select school.school_name from endowment join school on endowment.school_id = school.school_id where endowment.amount > 8.5 group by endowment.school_id having count ( * ) > 1

### Instruction:

Convert text to sql: Find the number of schools that have more than one donator whose donation amount is less than 8.5. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select count ( * ) from ( select * from endowment where amount > 8.5 group by school_id having count ( * ) > 1 )

### Instruction:

Convert text to sql: List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | 

### Response:

select school.school_name , school.mascot , school.ihsaa_football_class from school join budget on school.school_id = budget.school_id where budgeted > 6000 or year < 2003 order by budget.total_budget_percent_invested , budget.total_budget_percent_budgeted
### Instruction:

Convert text to sql: How many buildings are there? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select count ( * ) from building

### Instruction:

Convert text to sql: Show the name, street address, and number of floors for all buildings ordered by the number of floors. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select name , street_address , floors from building order by floors asc

### Instruction:

Convert text to sql: What is the name of the tallest building? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select name from building order by height_feet desc limit 1

### Instruction:

Convert text to sql: What are the average, maximum, and minimum number of floors for all buildings? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select avg ( floors ) , max ( floors ) , min ( floors ) from building
### Instruction:

Convert text to sql: Show the number of buildings with a height above the average or a number of floors above the average. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select count ( * ) from building where height_feet > ( select avg ( height_feet ) from building ) or floors > ( select avg ( floors ) from building )

### Instruction:

Convert text to sql: List the names of buildings with at least 200 feet of height and with at least 20 floors. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select name from building where height_feet >= 200 and floors >= 20

### Instruction:

Convert text to sql: Show the names and locations of institutions that are founded after 1990 and have the type "Private". | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select institution , location from institution where founded > 1990 and type = 'Private'

### Instruction:

Convert text to sql: Show institution types, along with the number of institutions and total enrollment for each type. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select type , count ( * ) , sum ( enrollment ) from institution group by type
### Instruction:

Convert text to sql: Show the institution type with the largest number of institutions. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select type from institution group by type order by count ( * ) desc limit 1

### Instruction:

Convert text to sql: Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select type from institution where founded > 1990 and enrollment >= 1000

### Instruction:

Convert text to sql: Show the name of buildings that do not have any institution. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select name from building where building_id not in ( select building_id from institution )

### Instruction:

Convert text to sql: Show the names of buildings except for those having an institution founded in 2003. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select name from building except select building.name from building join institution on building.building_id = institution.building_id where institution.founded = 2003
### Instruction:

Convert text to sql: For each building, show the name of the building and the number of institutions in it. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select building.name , count ( * ) from building join institution on building.building_id = institution.building_id group by building.building_id

### Instruction:

Convert text to sql: Show the names and heights of buildings with at least two institutions founded after 1880. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select building.name , building.height_feet from building join institution on building.building_id = institution.building_id where institution.founded > 1880 group by building.building_id having count ( * ) >= 2

### Instruction:

Convert text to sql: Show all the distinct institution types. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select distinct type from institution

### Instruction:

Convert text to sql: Show institution names along with the number of proteins for each institution. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select institution.institution , count ( * ) from institution join protein on institution.institution_id = protein.institution_id group by institution.institution_id
### Instruction:

Convert text to sql: How many proteins are associated with an institution founded after 1880 or an institution with type "Private"? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select count ( * ) from institution join protein on institution.institution_id = protein.institution_id where institution.founded > 1880 or institution.type = 'Private'

### Instruction:

Convert text to sql: Show the protein name and the institution name. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select protein.protein_name , institution.institution from institution join protein on institution.institution_id = protein.institution_id

### Instruction:

Convert text to sql: How many proteins are associated with an institution in a building with at least 20 floors? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select count ( * ) from institution join protein on institution.institution_id = protein.institution_id join building on building.building_id = institution.building_id where building.floors >= 20

### Instruction:

Convert text to sql: How many institutions do not have an associated protein in our record? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | 

### Response:

select count ( * ) from institution where institution_id not in ( select institution_id from protein )