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

Convert text to sql: display the average salary of employees for each department who gets a commission percentage. | 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 _ , avg ( _ ) from _ where _ group by _ | select department_id , avg ( salary ) from employees where commission_pct != 'null' group by department_id
### Instruction:

Convert text to sql: What is the average salary of employees who have a commission percentage that is not null? | 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 _ , avg ( _ ) from _ where _ group by _ | select department_id , avg ( salary ) from employees where commission_pct != 'null' group by department_id
### Instruction:

Convert text to sql: display the country ID and number of cities for each country. | 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 _ , count ( _ ) from _ group by _ | select country_id , count ( * ) from locations group by country_id
### Instruction:

Convert text to sql: Give the country id and corresponding count of cities in each country. | 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 _ , count ( _ ) from _ group by _ | select country_id , count ( * ) from locations group by country_id
### Instruction:

Convert text to sql: display job ID for those jobs that were done by two or more for more than 300 days. | 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 _ - _ group by _ having count ( _ ) >= _ | select job_id from job_history where end_date - start_date > 300 group by job_id having count ( * ) >= 2
### Instruction:

Convert text to sql: What are the job ids for jobs done more than once for a period of more than 300 days? | 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 _ - _ group by _ having count ( _ ) >= _ | select job_id from job_history where end_date - start_date > 300 group by job_id having count ( * ) >= 2
### Instruction:

Convert text to sql: display the ID for those employees who did two or more jobs in the past. | 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 _ group by _ having count ( _ ) >= _ | select employee_id from job_history group by employee_id having count ( * ) >= 2
### Instruction:

Convert text to sql: What are the employee ids for employees who have held two or more jobs? | 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 _ group by _ having count ( _ ) >= _ | select employee_id from job_history group by employee_id having count ( * ) >= 2
### Instruction:

Convert text to sql: Find employee with ID and name of the country presently where (s)he is working. | 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.employee_id , countries.country_name from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id join countries on locations.country_id = countries.country_id
### Instruction:

Convert text to sql: What are all the employee ids and the names of the countries in which they work? | 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.employee_id , countries.country_name from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id join countries on locations.country_id = countries.country_id
### Instruction:

Convert text to sql: display the department name and number of employees in each of the department. | 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 _ , count ( _ ) from _ group by _ | select departments.department_name , count ( * ) from employees join departments on employees.department_id = departments.department_id group by departments.department_name
### Instruction:

Convert text to sql: Give the name of each department and the number of employees in each. | 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 _ , count ( _ ) from _ group by _ | select departments.department_name , count ( * ) from employees join departments on employees.department_id = departments.department_id group by departments.department_name
### Instruction:

Convert text to sql: Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000? | 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 * from job_history join employees on job_history.employee_id = employees.employee_id where employees.salary >= 12000
### Instruction:

Convert text to sql: What is all the job history info done by employees earning a salary greater than or equal to 12000? | 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 * from job_history join employees on job_history.employee_id = employees.employee_id where employees.salary >= 12000
### Instruction:

Convert text to sql: display job title and average salary of 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 _ , avg ( _ ) from _ group by _ | select job_title , avg ( salary ) from employees join jobs on employees.job_id = jobs.job_id group by jobs.job_title
### Instruction:

Convert text to sql: What is the average salary for each job title? | 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 _ , avg ( _ ) from _ group by _ | select job_title , avg ( salary ) from employees join jobs on employees.job_id = jobs.job_id group by jobs.job_title
### Instruction:

Convert text to sql: What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163? | 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 _ from _ where _ ) | select first_name , last_name from employees where salary > ( select salary from employees where employee_id = 163 )
### Instruction:

Convert text to sql: Provide the full names of employees earning more than the employee with id 163. | 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 _ from _ where _ ) | select first_name , last_name from employees where salary > ( select salary from employees where employee_id = 163 )
### Instruction:

Convert text to sql: return the smallest salary for every departments. | 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 min ( _ ) , _ from _ group by _ | select min ( salary ) , department_id from employees group by department_id
### Instruction:

Convert text to sql: What is the minimum salary in each department? | 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 min ( _ ) , _ from _ group by _ | select min ( salary ) , department_id from employees group by department_id
### Instruction:

Convert text to sql: Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments. | 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 _ in ( select min ( _ ) from _ group by _ ) | select first_name , last_name , department_id from employees where salary in ( select min ( salary ) from employees group by department_id )