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

Convert text to sql: find the number of players whose points are lower than 30 in each position. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , position from player where points < 30 group by position
### Instruction:

Convert text to sql: What is the number of players who have points less than 30 for each position? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select count ( _ ) , _ from _ where _ group by _ | select count ( * ) , position from player where points < 30 group by position
### Instruction:

Convert text to sql: which country did participated in the most number of Tournament competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from competition where competition_type = 'Tournament' group by country order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: what is the name of the country that participated in the most tournament competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from competition where competition_type = 'Tournament' group by country order by count ( * ) desc limit 1
### Instruction:

Convert text to sql: which countries did participated in both Friendly and Tournament type competitions. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'
### Instruction:

Convert text to sql: What are the countries that participated in both friendly and tournament type competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'
### Instruction:

Convert text to sql: Find the countries that have never participated in any competition with Friendly type. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select _ from _ except select _ from _ where _ | select country from competition except select country from competition where competition_type = 'Friendly'
### Instruction:

Convert text to sql: What are the countries that have never participated in any friendly-type competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | 

### Response:

select _ from _ except select _ from _ where _ | select country from competition except select country from competition where competition_type = 'Friendly'
### Instruction:

Convert text to sql: How many furniture components are there in total? | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select sum ( _ ) from _ | select sum ( num_of_component ) from furniture
### Instruction:

Convert text to sql: Return the name and id of the furniture with the highest market rate. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ order by _ desc limit _ | select name , furniture_id from furniture order by market_rate desc limit 1
### Instruction:

Convert text to sql: find the total market rate of the furnitures that have the top 2 market shares. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select sum ( _ ) from _ order by _ desc limit _ | select sum ( market_rate ) from furniture order by market_rate desc limit 2
### Instruction:

Convert text to sql: Find the component amounts and names of all furnitures that have more than 10 components. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ where _ | select num_of_component , name from furniture where num_of_component > 10
### Instruction:

Convert text to sql: Find the name and component amount of the least popular furniture. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ order by _ asc limit _ | select name , num_of_component from furniture order by market_rate asc limit 1
### Instruction:

Convert text to sql: Find the names of furnitures whose prices are lower than the highest price. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ where _ < ( select max ( _ ) from _ ) | select furniture.name from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id where furniture_manufacte.price_in_dollar < ( select max ( price_in_dollar ) from furniture_manufacte )
### Instruction:

Convert text to sql: Which manufacturer has the most number of shops? List its name and year of opening. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ order by _ desc limit _ | select open_year , name from manufacturer order by num_of_shops desc limit 1
### Instruction:

Convert text to sql: Find the average number of factories for the manufacturers that have more than 20 shops. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select avg ( _ ) from _ where _ | select avg ( num_of_factories ) from manufacturer where num_of_shops > 20
### Instruction:

Convert text to sql: List all manufacturer names and ids ordered by their opening year. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ order by _ asc | select name , manufacturer_id from manufacturer order by open_year asc
### Instruction:

Convert text to sql: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ where _ | select name , open_year from manufacturer where num_of_shops > 10 or num_of_factories < 10
### Instruction:

Convert text to sql: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select max ( _ ) , avg ( _ ) from _ where _ | select max ( num_of_shops ) , avg ( num_of_factories ) from manufacturer where open_year < 1990
### Instruction:

Convert text to sql: Find the id and number of shops for the company that produces the most expensive furniture. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ order by _ desc limit _ | select manufacturer.manufacturer_id , manufacturer.num_of_shops from manufacturer join furniture_manufacte on manufacturer.manufacturer_id = furniture_manufacte.manufacturer_id order by furniture_manufacte.price_in_dollar desc limit 1
### Instruction:

Convert text to sql: Find the number of funiture types produced by each manufacturer as well as the company names. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select count ( _ ) , _ from _ group by _ | select count ( * ) , manufacturer.name from manufacturer join furniture_manufacte on manufacturer.manufacturer_id = furniture_manufacte.manufacturer_id group by manufacturer.manufacturer_id
### Instruction:

Convert text to sql: Give me the names and prices of furnitures which some companies are manufacturing. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ | select furniture.name , furniture_manufacte.price_in_dollar from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id
### Instruction:

Convert text to sql: Find the market shares and names of furnitures which no any company is producing in our records. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ where _ not in ( select _ from _ ) | select market_rate , name from furniture where furniture_id not in ( select furniture_id from furniture_manufacte )
### Instruction:

Convert text to sql: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | 

### Response:

select _ from _ where _ intersect select _ from _ where _ | select manufacturer.name from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id join manufacturer on furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id where furniture.num_of_component < 6 intersect select manufacturer.name from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id join manufacturer on furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id where furniture.num_of_component > 10
### Instruction:

Convert text to sql: Display the first name and department name for each employee. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | 

### Response:

select _ from _ | select employees.first_name , departments.department_name from employees join departments on employees.department_id = departments.department_id
### Instruction:

Convert text to sql: What are the first name and department name of all employees? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | 

### Response:

select _ from _ | select employees.first_name , departments.department_name from employees join departments on employees.department_id = departments.department_id
### Instruction:

Convert text to sql: List the full name (first and last name), and salary for those employees who earn below 6000. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | 

### Response:

select _ from _ where _ | select first_name , last_name , salary from employees where salary < 6000
### Instruction:

Convert text to sql: What are the full names and salaries for any employees earning less than 6000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | 

### Response:

select _ from _ where _ | select first_name , last_name , salary from employees where salary < 6000
### Instruction:

Convert text to sql: Display the first name, and department number for all employees whose last name is "McEwen". | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | 

### Response:

select _ from _ where _ | select first_name , department_id from employees where last_name = 'McEwen'
### Instruction:

Convert text to sql: What are the first names and department numbers for employees with last name McEwen? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | 

### Response:

select _ from _ where _ | select first_name , department_id from employees where last_name = 'McEwen'