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

Convert text to sql: What is the maximum enrollment across all schools? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | 

### Response:

select max ( enrollment ) from university

### Instruction:

Convert text to sql: Return the maximum enrollment across all schools. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | 

### Response:

select max ( enrollment ) from university

### Instruction:

Convert text to sql: List all information regarding the basketball match. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | 

### Response:

select * from basketball_match

### Instruction:

Convert text to sql: What is all the information about the basketball match? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | 

### Response:

select * from basketball_match

### Instruction:

Convert text to sql: List names of all teams in the basketball competition, ordered by all home scores in descending order. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | 

### Response:

select team_name from basketball_match order by all_home desc

### Instruction:

Convert text to sql: What are the names of all the teams in the basketball competition, sorted by all home scores in descending order? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | 

### Response:

select team_name from basketball_match order by all_home desc
### Instruction:

Convert text to sql: the names of models that launched between 2002 and 2004. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select model_name from chip_model where launch_year between 2002 and 2004

### Instruction:

Convert text to sql: Which model has the least amount of RAM? List the model name and the amount of RAM. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select model_name , ram_mib from chip_model order by ram_mib asc limit 1

### Instruction:

Convert text to sql: What are the chip model and screen mode of the phone with hardware model name "LG-P760"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select chip_model , screen_mode from phone where hardware_model_name = 'LG-P760'

### Instruction:

Convert text to sql: How many phone hardware models are produced by the company named "Nokia Corporation"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select count ( * ) from phone where company_name = 'Nokia Corporation'

### Instruction:

Convert text to sql: What is maximum and minimum RAM size of phone produced by company named "Nokia Corporation"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select max ( chip_model.ram_mib ) , min ( chip_model.ram_mib ) from chip_model join phone on chip_model.model_name = phone.chip_model where phone.company_name = 'Nokia Corporation'
### Instruction:

Convert text to sql: What is the average ROM size of phones produced by the company named "Nokia Corporation"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select avg ( chip_model.rom_mib ) from chip_model join phone on chip_model.model_name = phone.chip_model where phone.company_name = 'Nokia Corporation'

### Instruction:

Convert text to sql: List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select phone.hardware_model_name , phone.company_name from chip_model join phone on chip_model.model_name = phone.chip_model where chip_model.launch_year = 2002 or chip_model.ram_mib > 32

### Instruction:

Convert text to sql: Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select hardware_model_name , company_name from phone where accreditation_type like 'Full'

### Instruction:

Convert text to sql: Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760". | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select screen_mode.char_cells , screen_mode.pixels , screen_mode.hardware_colours from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.hardware_model_name = 'LG-P760'
### Instruction:

Convert text to sql: List the hardware model name and company name for the phone whose screen mode type is "Graphics." | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select phone.hardware_model_name , phone.company_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.type = 'Graphics'

### Instruction:

Convert text to sql: Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select company_name , count ( * ) from phone group by company_name order by count ( * ) asc limit 1

### Instruction:

Convert text to sql: List the name of the company that produced more than one phone model. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select company_name from phone group by company_name having count ( * ) > 1

### Instruction:

Convert text to sql: List the maximum, minimum and average number of used kb in screen mode. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select max ( used_kb ) , min ( used_kb ) , avg ( used_kb ) from screen_mode
### Instruction:

Convert text to sql: List the name of the phone model launched in year 2002 and with the highest RAM size. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select phone.hardware_model_name from chip_model join phone on chip_model.model_name = phone.chip_model where chip_model.launch_year = 2002 order by chip_model.ram_mib desc limit 1

### Instruction:

Convert text to sql: What are the wifi and screen mode type of the hardware model named "LG-P760"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select chip_model.wifi , screen_mode.type from chip_model join phone on chip_model.model_name = phone.chip_model join screen_mode on phone.screen_mode = screen_mode.graphics_mode where phone.hardware_model_name = 'LG-P760'

### Instruction:

Convert text to sql: List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select phone.hardware_model_name from chip_model join phone on chip_model.model_name = phone.chip_model join screen_mode on phone.screen_mode = screen_mode.graphics_mode where screen_mode.type = 'Text' or chip_model.ram_mib > 32

### Instruction:

Convert text to sql: List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics." | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select distinct phone.hardware_model_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.type = 'Graphics' or phone.company_name = 'Nokia Corporation'
### Instruction:

Convert text to sql: List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select distinct phone.hardware_model_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.company_name = 'Nokia Corporation' and screen_mode.type != 'Text'

### Instruction:

Convert text to sql: List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select distinct phone.hardware_model_name , phone.company_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.used_kb between 10 and 15

### Instruction:

Convert text to sql: Find the number of phones for each accreditation type. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select accreditation_type , count ( * ) from phone group by accreditation_type

### Instruction:

Convert text to sql: How many phones belongs to each accreditation type? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select accreditation_type , count ( * ) from phone group by accreditation_type
### Instruction:

Convert text to sql: Find the accreditation level that more than 3 phones use. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select accreditation_level from phone group by accreditation_level having count ( * ) > 3

### Instruction:

Convert text to sql: Find the details for all chip models. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select * from chip_model

### Instruction:

Convert text to sql: How many models do not have the wifi function? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select count ( * ) from chip_model where wifi = 'No'

### Instruction:

Convert text to sql: Count the number of chip model that do not have wifi. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select count ( * ) from chip_model where wifi = 'No'

### Instruction:

Convert text to sql: List all the model names sorted by their launch year. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select model_name from chip_model order by launch_year asc
### Instruction:

Convert text to sql: Find the average ram mib size of the chip models that are never used by any phone. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select avg ( ram_mib ) from chip_model where model_name not in ( select chip_model from phone )

### Instruction:

Convert text to sql: Find the names of the chip models that are not used by any phone with full accreditation type. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select model_name from chip_model except select chip_model from phone where accreditation_type = 'Full'

### Instruction:

Convert text to sql: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | 

### Response:

select screen_mode.pixels from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.accreditation_type = 'Provisional' intersect select screen_mode.pixels from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.accreditation_type = 'Full'