db_id
stringlengths
4
31
text
stringlengths
370
4.84k
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many heads of the departments are older than 56 ? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select count ( * ) from head where age > 56
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the name, born state and age of the heads of departments ordered by age. | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select name , born_state , age from head order by age asc
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the creation year, name and budget of each department. | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select creation , name , budget_in_billions from department
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the maximum and minimum budget of the departments? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select max ( budget_in_billions ) , min ( budget_in_billions ) from department
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average number of employees of the departments whose rank is between 10 and 15? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select avg ( num_employees ) from department where ranking between 10 and 15
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the heads who are born outside the California state? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select name from head where born_state != 'California'
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select distinct department.creation from department join management on department.department_id = management.department_id join head on management.head_id = head.head_id where head.born_state = 'Alabama'
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the states where at least 3 heads were born? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select born_state from head group by born_state having count ( * ) >= 3
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: In which year were most departments established? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select creation from department group by creation order by count ( * ) desc limit 1
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select department.name , department.num_employees from department join management on department.department_id = management.department_id where management.temporary_acting = 'Yes'
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many acting statuses are there? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select count ( distinct temporary_acting ) from management
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many departments are led by heads who are not mentioned? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select count ( * ) from department where department_id not in ( select department_id from management )
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the distinct ages of the heads who are acting? | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select distinct head.age from management join head on head.head_id = management.head_id where management.temporary_acting = 'Yes'
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born. | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select head.born_state from department join management on department.department_id = management.department_id join head on management.head_id = head.head_id where department.name = 'Treasury' intersect select head.born_state from department join management on department.department_id = management.department_id join head on management.head_id = head.head_id where department.name = 'Homeland Security'
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which department has more than 1 head at a time? List the id, name and the number of heads. | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select department.department_id , department.name , count ( * ) from management join department on department.department_id = management.department_id group by department.department_id having count ( * ) > 1
department_management
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which head's name has the substring 'Ha'? List the id and name. | department : department_id , name , creation , ranking , budget_in_billions , num_employees | head : head_id , name , born_state , age | management : department_id , head_id , temporary_acting | management.head_id = head.head_id | management.department_id = department.department_id | ### Response: select head_id , name from head where name like '%Ha%'
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many farms are there? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select count ( * ) from farm
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of farms. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select count ( * ) from farm
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the total number of horses on farms in ascending order. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select total_horses from farm order by total_horses asc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the total horses record for each farm, sorted ascending? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select total_horses from farm order by total_horses asc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the hosts of competitions whose theme is not "Aliens"? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select hosts from farm_competition where theme != 'Aliens'
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the hosts of competitions for which the theme is not Aliens? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select hosts from farm_competition where theme != 'Aliens'
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the themes of farm competitions sorted by year in ascending order? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select theme from farm_competition order by year asc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the themes of farm competitions, sorted by year ascending. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select theme from farm_competition order by year asc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the average number of working horses of farms with more than 5000 total number of horses? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select avg ( working_horses ) from farm where total_horses > 5000
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the average number of working horses on farms with more than 5000 total horses. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select avg ( working_horses ) from farm where total_horses > 5000
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the maximum and minimum number of cows across all farms. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select max ( cows ) , min ( cows ) from farm
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the maximum and minimum number of cows across all farms. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select max ( cows ) , min ( cows ) from farm
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many different statuses do cities have? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select count ( distinct status ) from city
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Count the number of different statuses. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select count ( distinct status ) from city
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List official names of cities in descending order of population. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name from city order by population desc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the official names of cities, ordered descending by population? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name from city order by population desc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the official name and status of the city with the largest population. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name , status from city order by population desc limit 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the official name and status of the city with the most residents? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name , status from city order by population desc limit 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the years and the official names of the host cities of competitions. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select farm_competition.year , city.official_name from city join farm_competition on city.city_id = farm_competition.host_city_id
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Give the years and official names of the cities of each competition. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select farm_competition.year , city.official_name from city join farm_competition on city.city_id = farm_competition.host_city_id
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the official names of the cities that have hosted more than one competition. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select city.official_name from city join farm_competition on city.city_id = farm_competition.host_city_id group by farm_competition.host_city_id having count ( * ) > 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the official names of cities that have hosted more than one competition? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select city.official_name from city join farm_competition on city.city_id = farm_competition.host_city_id group by farm_competition.host_city_id having count ( * ) > 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the status of the city that has hosted the greatest number of competitions. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select city.status from city join farm_competition on city.city_id = farm_competition.host_city_id group by farm_competition.host_city_id order by count ( * ) desc limit 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the status of the city that has hosted the most competitions? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select city.status from city join farm_competition on city.city_id = farm_competition.host_city_id group by farm_competition.host_city_id order by count ( * ) desc limit 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the themes of competitions with host cities having populations larger than 1000. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select farm_competition.theme from city join farm_competition on city.city_id = farm_competition.host_city_id where city.population > 1000
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the themes of competitions that have corresponding host cities with more than 1000 residents? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select farm_competition.theme from city join farm_competition on city.city_id = farm_competition.host_city_id where city.population > 1000
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the different statuses of cities and the average population of cities with each status. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status , avg ( population ) from city group by status
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the statuses and average populations of each city? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status , avg ( population ) from city group by status
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Please show the different statuses, ordered by the number of cities that have each. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status from city group by status order by count ( * ) asc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Return the different statuses of cities, ascending by frequency. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status from city group by status order by count ( * ) asc
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the most common type of Status across cities. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status from city group by status order by count ( * ) desc limit 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the most common status across all cities? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status from city group by status order by count ( * ) desc limit 1
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the official names of cities that have not held any competition. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name from city where city_id not in ( select host_city_id from farm_competition )
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the official names of cities that have not hosted a farm competition? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name from city where city_id not in ( select host_city_id from farm_competition )
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the status shared by cities with population bigger than 1500 and smaller than 500. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status from city where population > 1500 intersect select status from city where population < 500
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select status from city where population > 1500 intersect select status from city where population < 500
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the official names of cities with population bigger than 1500 or smaller than 500. | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name from city where population > 1500 or population < 500
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the official names of cities that have population over 1500 or less than 500? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select official_name from city where population > 1500 or population < 500
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Show the census ranking of cities whose status are not "Village". | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select census_ranking from city where status != 'Village'
farm
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the census rankings of cities that do not have the status "Village"? | city : city_id , official_name , status , area_km_2 , population , census_ranking | farm : farm_id , year , total_horses , working_horses , total_cattle , oxen , bulls , cows , pigs , sheep_and_goats | farm_competition : competition_id , year , theme , host_city_id , hosts | competition_record : competition_id , farm_id , rank | farm_competition.host_city_id = city.city_id | competition_record.farm_id = farm.farm_id | competition_record.competition_id = farm_competition.competition_id | ### Response: select census_ranking from city where status != 'Village'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: which course has most number of registered students? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select courses.course_name from courses join student_course_registrations on courses.course_id = student_course_registrations.course_id group by courses.course_id order by count ( * ) desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the name of the course with the most registered students? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select courses.course_name from courses join student_course_registrations on courses.course_id = student_course_registrations.course_id group by courses.course_id order by count ( * ) desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what is id of students who registered some courses but the least number of courses in these students? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_registrations group by student_id order by count ( * ) asc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of the students who registered for some courses but had the least number of courses for all students? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_registrations group by student_id order by count ( * ) asc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: what are the first name and last name of all candidates? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select people.first_name , people.last_name from candidates join people on candidates.candidate_id = people.person_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first and last names of all the candidates? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select people.first_name , people.last_name from candidates join people on candidates.candidate_id = people.person_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the id of students who never attends courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from students where student_id not in ( select student_id from student_course_attendance )
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of every student who has never attended a course? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from students where student_id not in ( select student_id from student_course_attendance )
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the id of students who attended some courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_attendance
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of all students who have attended at least one course? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_attendance
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of all students for courses and what are the names of those courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_course_registrations.student_id , courses.course_name from student_course_registrations join courses on student_course_registrations.course_id = courses.course_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is detail of the student who most recently registered course? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select students.student_details from student_course_registrations join students on student_course_registrations.student_id = students.student_id order by student_course_registrations.registration_date desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What details do we have on the students who registered for courses most recently? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select students.student_details from student_course_registrations join students on student_course_registrations.student_id = students.student_id order by student_course_registrations.registration_date desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students attend course English? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where courses.course_name = 'English'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many students are attending English courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where courses.course_name = 'English'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many courses do the student whose id is 171 attend? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where student_course_attendance.student_id = 171
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many courses does the student with id 171 actually attend? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where student_course_attendance.student_id = 171
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find id of the candidate whose email is stanley.monahan@example.org? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select candidates.candidate_id from people join candidates on people.person_id = candidates.candidate_id where people.email_address = 'stanley.monahan@example.org'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the id of the candidate whose email is stanley.monahan@example.org? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select candidates.candidate_id from people join candidates on people.person_id = candidates.candidate_id where people.email_address = 'stanley.monahan@example.org'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find id of the candidate who most recently accessed the course? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select candidate_id from candidate_assessments order by assessment_date desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the id of the candidate who most recently accessed the course? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select candidate_id from candidate_assessments order by assessment_date desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is detail of the student who registered the most number of courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select students.student_details from students join student_course_registrations on students.student_id = student_course_registrations.student_id group by students.student_id order by count ( * ) desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the details of the student who registered for the most number of courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select students.student_details from students join student_course_registrations on students.student_id = student_course_registrations.student_id group by students.student_id order by count ( * ) desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the id of students who registered some courses and the number of their registered courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select students.student_id , count ( * ) from students join student_course_registrations on students.student_id = student_course_registrations.student_id group by students.student_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For every student who is registered for some course, how many courses are they registered for? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select students.student_id , count ( * ) from students join student_course_registrations on students.student_id = student_course_registrations.student_id group by students.student_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: How many registed students do each course have? List course name and the number of their registered students? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select courses.course_name , count ( * ) from students join student_course_registrations on students.student_id = student_course_registrations.student_id join courses on student_course_registrations.course_id = courses.course_id group by student_course_registrations.course_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: For each course id, how many students are registered and what are the course names? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select courses.course_name , count ( * ) from students join student_course_registrations on students.student_id = student_course_registrations.student_id join courses on student_course_registrations.course_id = courses.course_id group by student_course_registrations.course_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find id of candidates whose assessment code is "Pass"? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select candidate_id from candidate_assessments where asessment_outcome_code = 'Pass'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of the candidates that have an outcome code of Pass? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select candidate_id from candidate_assessments where asessment_outcome_code = 'Pass'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find the cell mobile number of the candidates whose assessment code is "Fail"? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select people.cell_mobile_number from candidates join candidate_assessments on candidates.candidate_id = candidate_assessments.candidate_id join people on candidates.candidate_id = people.person_id where candidate_assessments.asessment_outcome_code = 'Fail'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the cell phone numbers of the candidates that received an assessment code of "Fail"? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select people.cell_mobile_number from candidates join candidate_assessments on candidates.candidate_id = candidate_assessments.candidate_id join people on candidates.candidate_id = people.person_id where candidate_assessments.asessment_outcome_code = 'Fail'
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the id of students who registered course 301? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_attendance where course_id = 301
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of the students who registered for course 301? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_attendance where course_id = 301
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What is the id of the student who most recently registered course 301? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_attendance where course_id = 301 order by date_of_attendance desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the ids of the students who registered for course 301 most recently? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_attendance where course_id = 301 order by date_of_attendance desc limit 1
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find distinct cities of addresses of people? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select distinct addresses.city from addresses join people_addresses on addresses.address_id = people_addresses.address_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different cities where people live? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select distinct addresses.city from addresses join people_addresses on addresses.address_id = people_addresses.address_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: Find distinct cities of address of students? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select distinct addresses.city from addresses join people_addresses on addresses.address_id = people_addresses.address_id join students on people_addresses.person_id = students.student_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the different cities where students live? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select distinct addresses.city from addresses join people_addresses on addresses.address_id = people_addresses.address_id join students on people_addresses.person_id = students.student_id
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the names of courses in alphabetical order? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select course_name from courses order by course_name asc
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the names of the courses in alphabetical order? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select course_name from courses order by course_name asc
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: List the first names of people in alphabetical order? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select first_name from people order by first_name asc
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the first names of the people in alphabetical order? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select first_name from people order by first_name asc
student_assessment
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. ### Instruction: Convert text to sql: What are the id of students who registered courses or attended courses? | addresses : address_id , line_1 , line_2 , city , zip_postcode , state_province_county , country | people : person_id , first_name , middle_name , last_name , cell_mobile_number , email_address , login_name , password | students : student_id , student_details | courses : course_id , course_name , course_description , other_details | people_addresses : person_address_id , person_id , address_id , date_from , date_to | student_course_registrations : student_id , course_id , registration_date | student_course_attendance : student_id , course_id , date_of_attendance | candidates : candidate_id , candidate_details | candidate_assessments : candidate_id , qualification , assessment_date , asessment_outcome_code | students.student_id = people.person_id | people_addresses.address_id = addresses.address_id | people_addresses.person_id = people.person_id | student_course_registrations.course_id = courses.course_id | student_course_registrations.student_id = students.student_id | student_course_attendance.student_id = student_course_registrations.student_id | student_course_attendance.course_id = student_course_registrations.course_id | candidates.candidate_id = people.person_id | candidate_assessments.candidate_id = candidates.candidate_id | ### Response: select student_id from student_course_registrations union select student_id from student_course_attendance

Dataset Card for Spider Context Instruct

Dataset Summary

Spider is a large-scale complex and cross-domain semantic parsing and text-to-SQL dataset annotated by 11 Yale students The goal of the Spider challenge is to develop natural language interfaces to cross-domain databases.

This dataset was created to finetune LLMs in a ### Instruction: and ### Response: format with database context.

Yale Lily Spider Leaderboards

The leaderboard can be seen at https://yale-lily.github.io/spider

Languages

The text in the dataset is in English.

Licensing Information

The spider dataset is licensed under the CC BY-SA 4.0

Citation

@article{yu2018spider,
  title={Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task},
  author={Yu, Tao and Zhang, Rui and Yang, Kai and Yasunaga, Michihiro and Wang, Dongxu and Li, Zifan and Ma, James and Li, Irene and Yao, Qingning and Roman, Shanelle and others},
  journal={arXiv preprint arXiv:1809.08887},
  year={2018}
}
Downloads last month
1
Edit dataset card